Skip to content
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

Allow ~'s to be arbitrarily placed without breaking things #870

Closed
logankilpatrick opened this issue Aug 20, 2021 · 3 comments
Closed

Allow ~'s to be arbitrarily placed without breaking things #870

logankilpatrick opened this issue Aug 20, 2021 · 3 comments

Comments

@logankilpatrick
Copy link
Contributor

I am a big fan of ~'s and whenever I add them, Franklin becomes unhappy if I forget to do /~. Is there a way to change this or add some sort fo safety measure so if you add them accidentally, it doesn't destroy Franklin?

@logankilpatrick
Copy link
Contributor Author

Or is the issue the "$" in JuliaLang/www.julialang.org#1356 ?

@tlienart
Copy link
Owner

Hmm so for $ this is definitely not easy to do as it's ambiguous with math mode; we could disable math mode for some pages but it makes stuff more complex (though I'll think about it)

For ~ it's easier as currently the only ambiguity comes from the triple one ~~~ as long as we don't add the rule ~...~ for strike through (GitHub flavoured markdown).

In any case to answer your question: right now there is no path to just put ~, you have to escape it (part of my initial reasoning for this was also to mimic what is done in latex for such symbols).

In the future a user will probably be allowed to toggle which parsing rules they want to disable for a page (similar to what you can do with CommonMark) but right not that's not possible.

@tlienart
Copy link
Owner

tlienart commented Aug 23, 2021

by the way my message was wrong, ~ are fine to be included anywhere as long as there's not three of them, so for instance:

"abc~def" |> fd2html

it's mostly $, \, `, _ and * that need to be escaped to avoid confusion with respectively math blocks, latex blocks, code blocks and emphasis blocks.

I'll close this for now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants