Skip to content

Commit 47d50d0

Browse files
committed
REVERT: Remove automated glossing of word literal line
1 parent 685e57e commit 47d50d0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/words/literal.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import createGlossLine from '../utilities/createGlossLine.js'
1+
import addEmphasis from '../utilities/addEmphasis.js'
22

3-
const cssClass = `wlt`
4-
5-
export default function createLiteral(data, options) {
3+
export default function createLiteral(data, { analysisLang }) {
64

75
if (!data) return ``
86

97
if (typeof data === `string`) {
10-
return createGlossLine(data, options.analysisLang, cssClass, options)
8+
const lang = analysisLang ? `lang='${ analysisLang }'` : ``
9+
return `<span class=wlt ${ lang }>${ addEmphasis(data) }</span>`
1110
}
1211

1312
let html = ``
1413

1514
for (const lang in data) {
16-
html += createGlossLine(data[lang], lang, cssClass, options)
15+
const tln = data[lang]
16+
html += `<span class=wlt lang='${ lang }'>${ addEmphasis(tln) }</span>`
1717
}
1818

1919
return html

test/words.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ describe(`words`, function() {
152152

153153
})
154154

155-
it(`supports glosses`, async function() {
155+
it(`supports (manual) glosses`, async function() {
156156

157157
const scription = `
158158
\\w qasi hix cuyi
159-
\\wlt man ERG he.went
159+
\\wlt man <abbr>erg</abbr> he.went
160160
`
161161

162162
const { dom } = await parse(scription, { glosses: true })

0 commit comments

Comments
 (0)