From 74a5cd60583ecfd600e37f0a0c865abb98fc73bc Mon Sep 17 00:00:00 2001 From: NoriDev Date: Sun, 18 Jun 2023 01:58:12 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"=E3=83=AB=E3=83=93=E8=A1=A8=E8=A8=98?= =?UTF-8?q?=E3=81=AB=E5=AF=BE=E5=BF=9C"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit df194e432bd03b53abf610832e72b92b1b5cce57. --- .../global/MkMisskeyFlavoredMarkdown.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts index e01022c8fa..52307283fd 100644 --- a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts +++ b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts @@ -60,21 +60,7 @@ export default function(props: { const res: (VNode | string)[] = []; for (const t of text.split('\n')) { res.push(h('br')); - t.replace(/(.+?)(.+?)<\/rt><\/ruby>/g, '\n$1$2\n') - .replace(/《《(.+?)》》/g, (match, c1) => c1.replace(/(.)/g, '\n$1\n')) - .replace(/[\||](.+?)《(.+?)》/g, '\n$1$2\n') - .replace(/([一-龠]+)《(.+?)》/g, '\n$1$2\n') - .replace(/[\||]《(.+?)》/g, '《$1》') - .split('\n') - .forEach( t2 => { - const match = t2.match(/(.+?)(.+?)<\/rt><\/ruby>/); - if (match !== null && match.length > 2) { - const rubyAlign = match[1].length < match[2].length ? 'ruby-align:center' : 'ruby-align:space-around'; - res.push(h('ruby', { style: rubyAlign }, [match[1], h('rt', match[2])])); - } else if (t2 !== '') { - res.push(t2); - } - }); + res.push(t); } res.shift(); return res;