jgm / djot.js

JavaScript implementation of djot
MIT License
141 stars 15 forks source link

Why entities in html output? #50

Closed bdarcus closed 1 year ago

bdarcus commented 1 year ago

Probably a small issue, but for the smart punctuation examples, you output as html entities. Why not just the appropriate unicode characters?

Beside the obvious, one can't process the output as XML:

❯ djot /tmp/test.dj | xmllint -
-:9: parser error : Entity 'hellip' not defined
<p>And now &hellip;</p>
                   ^
-:14: parser error : Entity 'ldquo' not defined
<p>&ldquo;Hello,&rdquo; said the spider.</p>
          ^
-:14: parser error : Entity 'rdquo' not defined
<p>&ldquo;Hello,&rdquo; said the spider.</p>
jgm commented 1 year ago

Maybe there was a reason, but if so I've forgotten what it was.