-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Math in Zettel titles is not rendered as math in Zettel links #548
Comments
To clarify further: Links to the above example Zettel are rendered as
but should be rendered as
|
Oh, you mean links. Right, neuron generates the following HTML <a href=".">Proof that 1 \neq 0</a> The Yup, the fix could go here: neuron/neuron/src/lib/Text/Pandoc/Util.hs Line 82 in 4687371
|
Though, this patch has no effect - so I've no idea. diff --git a/neuron/src/lib/Text/Pandoc/Util.hs b/neuron/src/lib/Text/Pandoc/Util.hs
index 6b853d67..bf187dfa 100644
--- a/neuron/src/lib/Text/Pandoc/Util.hs
+++ b/neuron/src/lib/Text/Pandoc/Util.hs
@@ -79,7 +79,7 @@ plainify = W.query $ \case
B.SoftBreak -> " "
B.LineBreak -> " "
B.RawInline _fmt s -> s
- B.Math _mathTyp s -> s
+ B.Math _mathTyp s -> "$" <> s <> "$"
-- Ignore the rest of AST nodes, as they are recursively defined in terms of
-- `Inline` which `W.query` will traverse again.
_ -> "" |
Thank you for looking into it! I might create a PR some time. |
Could anyone port this issue, if applicable, to Emanote? |
I often have mathematical expressions in Zettel titles, e.g.
# Proof that $1 \neq 0$ …
I thought that links to such a Zettel got rendered correctly in browser in an earlier release but this is not the case any more. Probably has something to do with a change in the used math engine? Can it be made to work again?
The text was updated successfully, but these errors were encountered: