diff options
Diffstat (limited to 'ext/js/language/ja/japanese-text-preprocessors.js')
-rw-r--r-- | ext/js/language/ja/japanese-text-preprocessors.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ext/js/language/ja/japanese-text-preprocessors.js b/ext/js/language/ja/japanese-text-preprocessors.js index 06f944c1..b3d50817 100644 --- a/ext/js/language/ja/japanese-text-preprocessors.js +++ b/ext/js/language/ja/japanese-text-preprocessors.js @@ -15,7 +15,7 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import {basicTextPreprocessorOptions} from '../text-preprocessors.js'; +import {basicTextProcessorOptions} from '../text-processors.js'; import {convertAlphabeticToKana} from './japanese-wanakana.js'; import { collapseEmphaticSequences as collapseEmphaticSequencesFunction, @@ -25,28 +25,28 @@ import { convertNumericToFullWidth } from './japanese.js'; -/** @type {import('language').TextPreprocessor<boolean>} */ +/** @type {import('language').TextProcessor<boolean>} */ export const convertHalfWidthCharacters = { name: 'Convert half width characters to full width', description: 'ヨミチャン → ヨミチャン', - options: basicTextPreprocessorOptions, - process: (str, setting, sourceMap) => (setting ? convertHalfWidthKanaToFullWidth(str, sourceMap) : str) + options: basicTextProcessorOptions, + process: (str, setting) => (setting ? convertHalfWidthKanaToFullWidth(str) : str) }; -/** @type {import('language').TextPreprocessor<boolean>} */ +/** @type {import('language').TextProcessor<boolean>} */ export const convertNumericCharacters = { name: 'Convert numeric characters to full width', description: '1234 → 1234', - options: basicTextPreprocessorOptions, + options: basicTextProcessorOptions, process: (str, setting) => (setting ? convertNumericToFullWidth(str) : str) }; -/** @type {import('language').TextPreprocessor<boolean>} */ +/** @type {import('language').TextProcessor<boolean>} */ export const convertAlphabeticCharacters = { name: 'Convert alphabetic characters to hiragana', description: 'yomichan → よみちゃん', - options: basicTextPreprocessorOptions, - process: (str, setting, sourceMap) => (setting ? convertAlphabeticToKana(str, sourceMap) : str) + options: basicTextProcessorOptions, + process: (str, setting) => (setting ? convertAlphabeticToKana(str) : str) }; /** @type {import('language').BidirectionalConversionPreprocessor} */ @@ -66,15 +66,15 @@ export const convertHiraganaToKatakana = { } }; -/** @type {import('language').TextPreprocessor<[collapseEmphatic: boolean, collapseEmphaticFull: boolean]>} */ +/** @type {import('language').TextProcessor<[collapseEmphatic: boolean, collapseEmphaticFull: boolean]>} */ export const collapseEmphaticSequences = { name: 'Collapse emphatic character sequences', description: 'すっっごーーい → すっごーい / すごい', options: [[false, false], [true, false], [true, true]], - process: (str, setting, sourceMap) => { + process: (str, setting) => { const [collapseEmphatic, collapseEmphaticFull] = setting; if (collapseEmphatic) { - str = collapseEmphaticSequencesFunction(str, collapseEmphaticFull, sourceMap); + str = collapseEmphaticSequencesFunction(str, collapseEmphaticFull); } return str; } |