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.
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, butthis.command
expects an AST as its first argument (cuz it callsthis.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.