jgm/djot.js

URL doesn't seem to be rendered properly

shi-yan opened this issue · 1 comments

In my code, I generate a djot AST and pass it to djot.js to render the djot format.

I found that it doesn't render the URLs (for example, {"tag":"url","text":"https://pandoc.org"}) into the djot output <https://pandoc.org>. If I render it into HTML instead, I could see the URLs.

the issue can be reproduced with

let json = String.raw`{"tag":"doc","references":{"this is a title":{"tag":"reference","label":"this is a title","destination":"#this_is_a_title"}},"footnotes":{},"children":[{"tag":"section","children":[{"tag":"para","children":[{"tag":"str","text":"and reference "},{"tag":"url","text":"https://pandoc.org/lua-filters"},{"tag":"str","text":" and inline? "},{"tag":"inline_math","text":"x^n + y^n = z^n"}]}]}]}`;

console.log(djot.renderDjot(JSON.parse(json)))
jgm commented

Thanks, fixed now.