From cd95491b5d3eef6ae35b56c1217e5446bef89325 Mon Sep 17 00:00:00 2001 From: Hiroshiba Date: Sat, 13 Jan 2024 00:04:14 +0900 Subject: [PATCH] =?UTF-8?q?=E5=B0=91=E3=81=97=E3=83=89=E3=82=AD=E3=83=A5?= =?UTF-8?q?=E3=83=A1=E3=83=B3=E3=83=88=E3=82=92=E8=B6=B3=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/utility.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/store/utility.ts b/src/store/utility.ts index 3ce9ab2ad8..33e0637e44 100644 --- a/src/store/utility.ts +++ b/src/store/utility.ts @@ -154,6 +154,9 @@ function replaceTag( return result; } +/** + * テキスト書き出し用のテキストを生成する。 + */ export function extractExportText( text: string, { @@ -169,6 +172,10 @@ export function extractExportText( } return text; } + +/** + * 読み用のテキストを生成する。 + */ export function extractYomiText( text: string, { @@ -184,6 +191,7 @@ export function extractYomiText( } return text; } + function skipRubyReadingPart(text: string): string { // テキスト内の全ての{漢字|かんじ}パターンを探し、漢字部分だけを残す return text.replace(/\{([^|]*)\|([^}]*)\}/g, "$1");