-
Notifications
You must be signed in to change notification settings - Fork 26
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
Faulty parsing of \ in link #139
Comments
Thank you for this report
|
Is there any documentation describing this? As it is different than all other Markdown implementation I've come across (including Gruber markdown) I think it would be good to have it documented. I don't mind adding it if it does not exist. As an aside, we have the same behaviour in Erlang but (IIRC) recently started warning for such places where the escape is not necessary and eventually plan to remove it altogether. It will take a couple of years until we can change the behaviour, but I think Erlang will become a tiny tiny bit better for it.
The most common usecase for escaping If this becomes an real problem I can spend some time and see if I can figure out where the bug is. |
That would be great indeed It is of course possible to deprecate |
I'll definitely leave this open and will tackle it as soon (but it will not be soon :( ) as possible. |
I was in the process of writing some docs describing this when I noticed that it seems like it is only within a link target that > EarmarkParser.as_ast(~S"\c")
{:ok, [{"p", [], ["\\c"], %{}}], []} From your description above I would have assumed it to be escaped everywhere? From my small experiments it would seem that Earmark treats |
Sorry for the late answer (triggered by another issue filed by you, ty) I have not noticed that yet. My appologies for the incorrect answer, it is not my style to cite facts from memory (a common fellony) but I did. On the bright side the not escaping case you showed above is the correct behavior 😊 . I'll try not to forget this issue this time |
It would seem like \ is interpreted incorrect/strange when in a link target. For example
I would expect the
\
to be part of the href (possibly uri encoded) and the)
should not be visible anywhere. babelmark seems to agree with this.I noticed that sending two
\\
more does what I expect, but the)
is still part of the result when it should not be:You may ask, why would anyone want to put a
\
in a link? When improving support for Erlang in ExDoc I need to be able to create links to thec
module. Naturally an mfa link to that would looks like thisc:ls/0
, which ExDoc interprets as a callback. So I was about to add the possibility to escape thec:
, so that it is interpreted as a mfa and the natural escape character for me is[shell ls() function](`\c:ls/0`)
, when I stumbled on this bug.The text was updated successfully, but these errors were encountered: