If there is a Pre tag, the text from that term is not included in the HTML export
ryancasburn-KAI opened this issue · comments
Ryan Casburn commented
compromise/src/1-one/output/api/html.js
Line 67 in 4ef66b3
Test case:
doc = nlp(`if i can recall, my grey dog loves pizza crusts (they are really good).`)
html = doc.html({ '.red': 'my grey dog', '.blue': doc.match('loves') })
t.equal(
html,
`if i can recall, <span class="red">my grey dog</span> <span class="blue">loves</span> pizza crusts (they are really good).`,
here + 'html two classes'
)
Currently returning:
if i can recall, <span class="red">my grey dog</span> <span class="redTwo">loves</span> pizza crusts ( are really good).
suggestion is:
out += t.pre || ''
out += t.text || ''
Any issues with that?
spencer kelly commented
oh my gosh, it's missing the word??
yeah! please add a fix!
holy cow
spencer kelly commented
released as 14.11.1
- thank you!