-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
Weird backslash insertion in kramdown writer #751
Comments
➔
I can't find the code that does this backslash insertion. |
The backslash insert is done here: https://github.com/gettalong/kramdown/blob/master/lib/kramdown/converter/kramdown.rb#L78-L80 I think the code should actually read: end.gsub(/\s+/, ' ').gsub(ESCAPED_CHAR_RE) do
$1 || !opts[:prev] || opts[:prev].type == :br ? "\\#{$1 || $2}" : $&
end But have to think a bit more about it. |
Ah. I now understand the bug.
So the code is trying to protect against spuriously generating definition lists? |
Couldn't a ":" start a new line in Yep:
It's really not that easy to generate markdown... |
I'd probably do this two-pass:
|
Thanks for the second test case which needed another fix. I will push the commit with the fix later (when it is actually committed and tested ;-) |
@cabo The latest commit contains the fixes for the bugs. |
I can report that the fix works for my use case. Thank you! |
Now what I need is a release so this bug fix trickles into a few production servers... |
@cabo Will do when I have time, probably on the weekend |
@cabo Release follows shortly |
No description provided.
The text was updated successfully, but these errors were encountered: