-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
markdown - spec - current implementation of _
is problematic
#23
Comments
as we are currently not handling markdown styles at all, it may be okay to support a subset only - but it may still be regarded as a bug and ppl may be wondering. are there other notable markdown implementations that skip underscore processing? is this maybe a usual thing meanwhile? i am not too much for/in markdown at all, however, removing such basic thing as and: hasn't sth. as maybe also the parser can maybe do better, eg. allowing |
in general, if we do not want to rely on parsing rules as there are too many cornercases (markdown is only apparently simple, reminds me very much to yaml :) we could also leave the formatting characters in the resulting text. i have seen this here and there, and think this not the worse compromise, also makes adaption easier and a bad rule does not break things badly: imagine passwords sent over delta chat with markdown support: this may be close to impossible, at least unreliable, if we introduce markdown |
we define what we want to support in https://github.com/deltachat/message-parser/blob/master/spec.md
sure that's an option, but also more complicated than just removing underscore or saying that only on wordboundries is allowed. a side benefit of only on word boundaries is that it could make the parsing slightly faster.
also a valid angle, but does not look as good.
I think element auto-escapes stuff you paste into it, another option would be to allow users to toggle markdown rendering in their messages... but right there are more open questions to the whole rich message topic, also wether we want to send messages as html or not. |
another example I came across: |
the text emote |
just tested WhatsApp, it has
so italics only works when started and ended outside of a word. Which could also be a solution for us here. |
_
for italics and bold_
is problematic
_
is problematic_
is problematic
another bug in the implementation of
which should be displayed as: is actually displayed as: [ (the [ is italic while the rest of the link is not parsed) |
This is also how pandoc handles it:
CommonMark has a very precise definition: |
undercore
_
is used often in text. especially for programmers having things likeANDROID_NDK_ROOT
in a message is not a rare occurrence.currently
ANDROID_NDK_ROOT
parses intowhich is not desired in most cases.
Proposed solution
remove underscore variants from bold and italics, so its just
*italics*
and**bold**
The text was updated successfully, but these errors were encountered: