Conversation
| RawContent(NonEmptySet.of("html"), KaTeX(body, false)), | ||
| RawContent(NonEmptySet.of("rss"), KaTeX(body, false, "mathml")) |
There was a problem hiding this comment.
So the idea is roughly:
We register a @math directive, usable as a span or block.
It is formatted as a span with to pieces of content (SpanSequence).
This first RawContent only renders if we are targeting the html format, and in that case we use the default of KaTex output which is htmlAndMathml.
The second RawContent only renders if we are targeting our custom rss format in which case we use the mathml output.
| fmt, | ||
| RawContent(NonEmptySet.of("html"), content, options) | ||
| ) | ||
| else "" |
There was a problem hiding this comment.
And here, in the custom RSS render format, we are saying we should only render RawContent if it's format specifically has rss in it, otherwise return the empty string (as opposed to using the default html renderer, which is what we had been doing).
So would this mean that raw html content, like the every.org button on https://typelevel.org/foundation/ would not render in RSS at all anymore?
There was a problem hiding this comment.
So would this mean that raw html content, like the every.org button on typelevel.org/foundation would not render in RSS at all anymore?
It doesn't, because perhaps counter-intuitively I implemented the @:html directive to output content for both HTML and RSS!
typelevel.github.com/build.scala
Lines 330 to 335 in cfd1b0a
Closes #149.
My RSS reader appears to support MathML. To make this work, needed a couple tweaks: