my text
'); const lastText = textParts.pop(); text = ''; for (let i = 0; i < textParts.length; i++) { const textPart = textParts[i]; const start = textPart.indexOf(''; preTags.push([name, textPart.substr(start) + '
. texts.forEach(textPiece => { text += '
' + textPiece.replace(/^\n*|\n*$/g, '') + '
\s*<\/p>/g, ''); // Add a closing
inside
([^<]+)<\/(div|address|form)>/g, '
$1
, unwrap it. text = text.replace(new RegExp('
\\s*(?' + allBlocks + '[^>]*>)\\s*
, fix them. text = text.replace(/
(
is wrapped with a , move it inside the . text = text.replace(/]*)>/gi, ''); text = text.replace(/<\/blockquote><\/p>/g, ''); // If an opening or closing block element tag is preceded by an opening tag, remove it. text = text.replace(new RegExp('\\s*(?' + allBlocks + '[^>]*>)', 'g'), '$1'); // If an opening or closing block element tag is followed by a closing tag, remove it. text = text.replace(new RegExp('(?' + allBlocks + '[^>]*>)\\s*', 'g'), '$1'); // Optionally insert line breaks. if (br) { // Replace newlines that shouldn't be touched with a placeholder. text = text.replace(/<(script|style).*?<\/\\1>/g, match => match[0].replace(/\n/g, '')); // Normalize text = text.replace(/|/g, ''); // Replace any new line characters that aren't preceded by a with a . text = text.replace(/()?\s*\n/g, (a, b) => b ? a : '\n'); // Replace newline placeholders with newlines. text = text.replace(//g, '\n'); } // If a tag is after an opening or closing block tag, remove it. text = text.replace(new RegExp('(?' + allBlocks + '[^>]*>)\\s*', 'g'), '$1'); // If a tag is before a subset of opening or closing block tags, remove it. text = text.replace(/(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g, '$1'); text = text.replace(/\n<\/p>$/g, ''); // Replace placeholder tags with their original content. preTags.forEach(preTag => { const [name, original] = preTag; text = text.replace(name, original); }); // Restore newlines in all elements. if (-1 !== text.indexOf('')) { text = text.replace(/\s?\s?/g, '\n'); } return text; } /** * Replaces `` tags with two line breaks. "Opposite" of autop(). * * Replaces `` tags with two line breaks except where the `` has attributes. * Unifies whitespace. Indents ``, `` and `` for better readability. * * @param html The content from the editor. * * @example * ```js * import { removep } from '@wordpress/autop'; * removep( 'my text' ); // "my text" * ``` * * @return The content with stripped paragraph tags. */ function removep(html) { const blocklist = 'blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure'; const blocklist1 = blocklist + '|div|p'; const blocklist2 = blocklist + '|pre'; const preserve = []; let preserveLinebreaks = false; let preserveBr = false; if (!html) { return ''; } // Protect script and style tags. if (html.indexOf(' kahoku table tennisとは? 練習・大会・遠征 練習日程 入会、お試し参加 入会 お試し参加 検索検索 MENU kahoku table tennis MENU kahoku table tennisとは? 練習・大会・遠征 練習日程 入会、お試し参加 入会 お試し参加 kahoku table tennisとは? 練習・大会・遠征 練習日程 入会、お試し参加 入会 お試し参加 私たちは卓球を通して 卓球を通し競技力の向上、挨拶、礼儀、感謝の気持ちを大切に選手を育てていきます。 どんな団体? 練習・大会・遠征 体験練習・入会希望 活動紹介 NEWSお知らせ ブログ 備忘録2 nuno 2023年6月6日 ブログ ブログ 備忘録1 nuno 2023年6月6日 ブログ お知らせ お知らせ3 nuno 2023年6月6日 お知らせ お知らせ お知らせ2 nuno 2023年6月6日 お知らせ お知らせ お知らせ1 nuno 2023年6月6日 お知らせ 大会結果 イベント3 nuno 2023年6月6日 大会結果 大会結果 イベント2 nuno 2023年6月6日 大会結果 お知らせ一覧 練習日程(会員のみ) COMING SOON! COMING SOON! Gallery練習・試合風景Gallery Contactお試し・入会ご検討の方Contact 検索
, move it inside the
. text = text.replace(/]*)>/gi, ''); text = text.replace(/<\/blockquote><\/p>/g, ''); // If an opening or closing block element tag is preceded by an opening tag, remove it. text = text.replace(new RegExp('\\s*(?' + allBlocks + '[^>]*>)', 'g'), '$1'); // If an opening or closing block element tag is followed by a closing tag, remove it. text = text.replace(new RegExp('(?' + allBlocks + '[^>]*>)\\s*', 'g'), '$1'); // Optionally insert line breaks. if (br) { // Replace newlines that shouldn't be touched with a placeholder. text = text.replace(/<(script|style).*?<\/\\1>/g, match => match[0].replace(/\n/g, '')); // Normalize text = text.replace(/|/g, ''); // Replace any new line characters that aren't preceded by a with a . text = text.replace(/()?\s*\n/g, (a, b) => b ? a : '\n'); // Replace newline placeholders with newlines. text = text.replace(//g, '\n'); } // If a tag is after an opening or closing block tag, remove it. text = text.replace(new RegExp('(?' + allBlocks + '[^>]*>)\\s*', 'g'), '$1'); // If a tag is before a subset of opening or closing block tags, remove it. text = text.replace(/(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g, '$1'); text = text.replace(/\n<\/p>$/g, ''); // Replace placeholder tags with their original content. preTags.forEach(preTag => { const [name, original] = preTag; text = text.replace(name, original); }); // Restore newlines in all elements. if (-1 !== text.indexOf('')) { text = text.replace(/\s?\s?/g, '\n'); } return text; } /** * Replaces `` tags with two line breaks. "Opposite" of autop(). * * Replaces `` tags with two line breaks except where the `` has attributes. * Unifies whitespace. Indents ``, `` and `` for better readability. * * @param html The content from the editor. * * @example * ```js * import { removep } from '@wordpress/autop'; * removep( 'my text' ); // "my text" * ``` * * @return The content with stripped paragraph tags. */ function removep(html) { const blocklist = 'blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure'; const blocklist1 = blocklist + '|div|p'; const blocklist2 = blocklist + '|pre'; const preserve = []; let preserveLinebreaks = false; let preserveBr = false; if (!html) { return ''; } // Protect script and style tags. if (html.indexOf(' kahoku table tennisとは? 練習・大会・遠征 練習日程 入会、お試し参加 入会 お試し参加 検索検索 MENU kahoku table tennis MENU kahoku table tennisとは? 練習・大会・遠征 練習日程 入会、お試し参加 入会 お試し参加 kahoku table tennisとは? 練習・大会・遠征 練習日程 入会、お試し参加 入会 お試し参加 私たちは卓球を通して 卓球を通し競技力の向上、挨拶、礼儀、感謝の気持ちを大切に選手を育てていきます。 どんな団体? 練習・大会・遠征 体験練習・入会希望 活動紹介 NEWSお知らせ ブログ 備忘録2 nuno 2023年6月6日 ブログ ブログ 備忘録1 nuno 2023年6月6日 ブログ お知らせ お知らせ3 nuno 2023年6月6日 お知らせ お知らせ お知らせ2 nuno 2023年6月6日 お知らせ お知らせ お知らせ1 nuno 2023年6月6日 お知らせ 大会結果 イベント3 nuno 2023年6月6日 大会結果 大会結果 イベント2 nuno 2023年6月6日 大会結果 お知らせ一覧 練習日程(会員のみ) COMING SOON! COMING SOON! Gallery練習・試合風景Gallery Contactお試し・入会ご検討の方Contact 検索
]*)>/gi, ''); text = text.replace(/<\/blockquote><\/p>/g, ''); // If an opening or closing block element tag is preceded by an opening tag, remove it. text = text.replace(new RegExp('\\s*(?' + allBlocks + '[^>]*>)', 'g'), '$1'); // If an opening or closing block element tag is followed by a closing tag, remove it. text = text.replace(new RegExp('(?' + allBlocks + '[^>]*>)\\s*', 'g'), '$1'); // Optionally insert line breaks. if (br) { // Replace newlines that shouldn't be touched with a placeholder. text = text.replace(/<(script|style).*?<\/\\1>/g, match => match[0].replace(/\n/g, '')); // Normalize text = text.replace(/|/g, ''); // Replace any new line characters that aren't preceded by a with a . text = text.replace(/()?\s*\n/g, (a, b) => b ? a : '\n'); // Replace newline placeholders with newlines. text = text.replace(//g, '\n'); } // If a tag is after an opening or closing block tag, remove it. text = text.replace(new RegExp('(?' + allBlocks + '[^>]*>)\\s*', 'g'), '$1'); // If a tag is before a subset of opening or closing block tags, remove it. text = text.replace(/(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g, '$1'); text = text.replace(/\n<\/p>$/g, ''); // Replace placeholder tags with their original content. preTags.forEach(preTag => { const [name, original] = preTag; text = text.replace(name, original); }); // Restore newlines in all elements. if (-1 !== text.indexOf('')) { text = text.replace(/\s?\s?/g, '\n'); } return text; } /** * Replaces `` tags with two line breaks. "Opposite" of autop(). * * Replaces `` tags with two line breaks except where the `` has attributes. * Unifies whitespace. Indents ``, `` and `` for better readability. * * @param html The content from the editor. * * @example * ```js * import { removep } from '@wordpress/autop'; * removep( 'my text' ); // "my text" * ``` * * @return The content with stripped paragraph tags. */ function removep(html) { const blocklist = 'blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure'; const blocklist1 = blocklist + '|div|p'; const blocklist2 = blocklist + '|pre'; const preserve = []; let preserveLinebreaks = false; let preserveBr = false; if (!html) { return ''; } // Protect script and style tags. if (html.indexOf(' kahoku table tennisとは? 練習・大会・遠征 練習日程 入会、お試し参加 入会 お試し参加 検索検索 MENU kahoku table tennis MENU kahoku table tennisとは? 練習・大会・遠征 練習日程 入会、お試し参加 入会 お試し参加 kahoku table tennisとは? 練習・大会・遠征 練習日程 入会、お試し参加 入会 お試し参加 私たちは卓球を通して 卓球を通し競技力の向上、挨拶、礼儀、感謝の気持ちを大切に選手を育てていきます。 どんな団体? 練習・大会・遠征 体験練習・入会希望 活動紹介 NEWSお知らせ ブログ 備忘録2 nuno 2023年6月6日 ブログ ブログ 備忘録1 nuno 2023年6月6日 ブログ お知らせ お知らせ3 nuno 2023年6月6日 お知らせ お知らせ お知らせ2 nuno 2023年6月6日 お知らせ お知らせ お知らせ1 nuno 2023年6月6日 お知らせ 大会結果 イベント3 nuno 2023年6月6日 大会結果 大会結果 イベント2 nuno 2023年6月6日 大会結果 お知らせ一覧 練習日程(会員のみ) COMING SOON! COMING SOON! Gallery練習・試合風景Gallery Contactお試し・入会ご検討の方Contact 検索
'); text = text.replace(/<\/blockquote><\/p>/g, '
tag, remove it. text = text.replace(new RegExp('
\\s*(?' + allBlocks + '[^>]*>)', 'g'), '$1'); // If an opening or closing block element tag is followed by a closing
tag, remove it. text = text.replace(new RegExp('(?' + allBlocks + '[^>]*>)\\s*
tags with their original content. preTags.forEach(preTag => { const [name, original] = preTag; text = text.replace(name, original); }); // Restore newlines in all elements. if (-1 !== text.indexOf('')) { text = text.replace(/\s?\s?/g, '\n'); } return text; } /** * Replaces `` tags with two line breaks. "Opposite" of autop(). * * Replaces `` tags with two line breaks except where the `` has attributes. * Unifies whitespace. Indents `
` tags with two line breaks. "Opposite" of autop(). * * Replaces `
` tags with two line breaks except where the `
` has attributes. * Unifies whitespace. Indents `
卓球を通し競技力の向上、挨拶、礼儀、感謝の気持ちを大切に選手を育てていきます。