Skip to content

Commit

Permalink
FIX: Class not defined for literal word translation
Browse files Browse the repository at this point in the history
  • Loading branch information
dwhieb committed Mar 17, 2024
1 parent cd4efc2 commit bb7cc6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/words/literal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/words.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`)

Expand Down

0 comments on commit bb7cc6c

Please sign in to comment.