Markdown support doesn't support escaped characters
Reported by Steve Mayer | May 1st, 2013 @ 06:24 PM
When using the Markdown support, I should be able to use _ and * to escape these Markdown characters (to get an actual '_' or '*'). This doesn't appear to work (at least in the previewer, I don't see it working properly).
Using build 3371.
thanks,
Comments and changes to this ticket
-
benny May 1st, 2013 @ 06:52 PM
- State changed from new to reproduced
It actually works, but it's not obvious because MailMate is a bit too smart in this case. MailMate keeps an eye on whether any Markdown syntax is actually used or not. This is done by running it through conversion and then look for non-trivial markup. If none is used then the message is sent as plain text without the use of Markdown.
In other words, this won't work as expected with Markdown enabled:
This is not \*emphasized\*.
But this works:
This is not \*emphasized\*, but this is *emphasized*.
The latter works because Markdown is enabled.
The solution/workaround is to disabled Markdown if Markdown is not really used and then not escape the symbols.
Did that make sense? :-)
I like that MailMate automatically detects when Markdown is not needed, so I'm unsure how this can be improved. Maybe I should also do a simple check for escaped characters. I'll think about that.
-
Steve Mayer May 1st, 2013 @ 06:59 PM
Let me see if I can clarify.
I had a paragraph that I wanted emphasized, so I added _ to the beginning and end of the paragraph. In the preview window, all was italicized (as expected). Within that paragraph, there was a phrase that contained underscores that I wanted to keep as underscores (and not try to emphasize any surrounding characters), i.e. This_is_what (not Thisiswhat)
In this case, I should have been able to use Markdown, but type 'This_is_what' and have the underscores left in place. I didn't see this happening in the preview window.
Hope that clarifies things.
-
benny May 1st, 2013 @ 07:09 PM
Ah, got it now. Apparently there is a bug in the Markdown converter (I use a slightly altered version of sundown). I'll look into it, but it may take a while if it's non-trivial (not a high priority item).
Apparently a few Markdown implementation have problems with this special case as can be seen here.
-
Steve Mayer May 1st, 2013 @ 07:15 PM
Thanks Benny!
Appreciate the link also. Shows that what I want to have happen only breaks in RedCarpet 2.2.2.
-
benny May 1st, 2013 @ 07:18 PM
And 'marked 0.2.6'. RedCarpet is also based on sundown, so it makes sense that it fails in MailMate as well.
-
benny May 3rd, 2013 @ 11:01 AM
- State changed from reproduced to fixcommitted
All my changes to
sundown
can be seen here. -
Steve Mayer May 4th, 2013 @ 02:34 PM
Benny,
I noticed that the latest test build fixes this issue. I am seeing some strange side effect though. Email addresses appear a little strangely as shown in the screenshot I've attached.
Any thoughts?
-
benny May 4th, 2013 @ 02:39 PM
Thanks, I don't think it is related to my fix, but I did update my version of sundown with the latest changes on github (after doing the fix) and either that included a bug or merging with some of my changes created a bug.
Let me know if you see other issues. I can reproduce this and I'll look into it.
-
benny May 4th, 2013 @ 03:28 PM
It seems the problem is somehow related to how I compiled the
sundown
executable (I cannot reproduce the problem on my current machine). Unfortunately I cannot release a new version before Monday. -
Steve Mayer November 4th, 2013 @ 11:16 PM
Benny,
I posted this in the maillist, but I'm re-opening this ticket as the behavior has returned.
If I try to escape the underscore characters (This_is_a_test), I'll end up with the backslashes in the output. If I don't put the backslashes in, I'll get Thisisatest (with italics present).
Using the latest b3816.
Thanks!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Mac OS X email client.
People watching this ticket
Attachments
Referenced by
- 477 Issue #387 appears to have returned. Benny, I posted this in the mailing list, but I'm re-open...