uwdata / living-papers

Authoring tools for scholarly communication. Create interactive web pages or formal research papers from markdown source.
BSD 3-Clause "New" or "Revised" License
131 stars 10 forks source link

fix: stop double-processing tex in spans #102

Closed joshuahhh closed 2 months ago

joshuahhh commented 2 months ago

Previously, something like [*emph in span*]{.smallcaps} would result in "\emph{emph in span}" in small caps (with the LaTeX code visible in the PDF).

Cause: this.fragment returns a string, but this.command expects an AST as its first argument (cuz it calls this.fragment on it itself). So we're transforming to LaTeX and then transforming that to LaTeX again, which treats it as a string of content.

jheer commented 2 months ago

The change looks good, thanks! Just need to investigate why the tests are failing…