Fix "thaught in" capitalisation

This commit is contained in:
Oystein Kristoffer Tveit 2020-05-28 22:51:47 +02:00
parent 4355494602
commit 8fa6d705b5
1 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,10 @@ function getKanjiTexData(kanjiArray) {
const kunyomi = textFiltration.convertKunyomi(kanji); const kunyomi = textFiltration.convertKunyomi(kanji);
const onyomi = textFiltration.convertOnyomi(kanji); const onyomi = textFiltration.convertOnyomi(kanji);
kanji.taughtIn = kanji.taughtIn ?
kanji.taughtIn.charAt(0).toUpperCase() + kanji.taughtIn.slice(1)
: '';
return { return {
kanji: kanji.query, kanji: kanji.query,
kanjiPageHeader: `\\kanjiPageHeader{${kanji.query}}{${kanji.taughtIn}}{${kanji.jlptLevel}}{${kanji.strokeCount}}{${kanji.radical.symbol}}`, kanjiPageHeader: `\\kanjiPageHeader{${kanji.query}}{${kanji.taughtIn}}{${kanji.jlptLevel}}{${kanji.strokeCount}}{${kanji.radical.symbol}}`,