From bb7cc6c963ecfd2f9c2e28ffdd46ae2b5907ab6a Mon Sep 17 00:00:00 2001 From: "Daniel W. Hieber" Date: Sun, 17 Mar 2024 00:52:22 -0500 Subject: [PATCH] FIX: Class not defined for literal word translation --- src/words/literal.js | 4 ++-- test/words.test.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/words/literal.js b/src/words/literal.js index 67ef73c..5e1b12b 100644 --- a/src/words/literal.js +++ b/src/words/literal.js @@ -7,13 +7,13 @@ export default function createLiteral(data, options) { if (!data) return `` if (typeof data === `string`) { - return createGlossLine(data, cssClass, options.analysisLang, options) + return createGlossLine(data, options.analysisLang, cssClass, options) } let html = `` for (const lang in data) { - html += createGlossLine(data[lang], cssClass, lang, options) + html += createGlossLine(data[lang], lang, cssClass, options) } return html diff --git a/test/words.test.js b/test/words.test.js index d487ff7..63d66bb 100644 --- a/test/words.test.js +++ b/test/words.test.js @@ -144,8 +144,8 @@ describe(`words`, function() { \\wlt man ERG he.went ` - const { dom, html } = await parse(scription, { glosses: true }) - const abbr = findElement(dom, el => getTagName(el) === `abbr`) + const { dom } = await parse(scription, { glosses: true }) + const abbr = findElement(dom, el => getTagName(el) === `abbr`) expect(getTextContent(abbr)).to.equal(`ERG`)