You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to render a blockquote throws an exception right now:
user> (markdown->clj-pdf"> This is a quote")
java.lang.IllegalArgumentException: No matching field found: getLiteral for class org.commonmark.node.BlockQuote
The issue is that the :default case of the render method relies on .getLiteral on the parsed element. This works fine for code blocks etc, but blockquotes are parsed differently by commonmark-java. For this case it creates a BlockQuote containing one or more Paragraph nodes. The BlockQuote node itself has no .getLiteral implementation, hence the error.
Something like this seems to work, but I'm not familiar enough with this lib and clj-pdf to be sure it's entirely the right approach:
Trying to render a blockquote throws an exception right now:
The issue is that the
:default
case of therender
method relies on.getLiteral
on the parsed element. This works fine for code blocks etc, but blockquotes are parsed differently by commonmark-java. For this case it creates a BlockQuote containing one or more Paragraph nodes. The BlockQuote node itself has no .getLiteral implementation, hence the error.Something like this seems to work, but I'm not familiar enough with this lib and clj-pdf to be sure it's entirely the right approach:
It also has the downside of using a plain :paragraph, which makes it hard to style quotes.
The text was updated successfully, but these errors were encountered: