Skip to content

Commit

Permalink
少しドキュメントを足した
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Jan 12, 2024
1 parent e1d4d90 commit cd95491
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/store/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ function replaceTag(
return result;
}

/**
* テキスト書き出し用のテキストを生成する。
*/
export function extractExportText(
text: string,
{
Expand All @@ -169,6 +172,10 @@ export function extractExportText(
}
return text;
}

/**
* 読み用のテキストを生成する。
*/
export function extractYomiText(
text: string,
{
Expand All @@ -184,6 +191,7 @@ export function extractYomiText(
}
return text;
}

function skipRubyReadingPart(text: string): string {
// テキスト内の全ての{漢字|かんじ}パターンを探し、漢字部分だけを残す
return text.replace(/\{([^|]*)\|([^}]*)\}/g, "$1");
Expand Down

0 comments on commit cd95491

Please sign in to comment.