You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import com.petebevin.markdown.MarkdownProcessor;
public class Foo {
public static void main(String[] args) {
System.out.println(new MarkdownProcessor().markdown(
"`y>x` foo `y<x` bar `y>x`"));
System.out.println(new MarkdownProcessor().markdown(
"`y>x` foo\n`y<x` bar\n`y>x`\n"));
}
}
The printed strings are
<p><code>y>x</code> foo <code>y<x` bar `y>x</code></p>
and
<p><code>y>x</code> foo
`y<x` bar
`y>x`</p>
I tracked the problem down to runSpanGamut() and escapeSpecialCharsWithinTagAttributes(). The latter tried to get text between < and > and replace special chars within those tokens, but the tokenizing is going wrong.
I noticed that in the original markdown runSpanGamut() does the code spans first and then does the special chars, so unless they've been swapped for some other reason, that's probably the way to fix it. Otherwise TextEditor.tokenizeHTML() will need to do a better job.
I've previously reported this to alex via email, but got no response.
From [email protected] on November 21, 2011 12:31:11
Found a bug in markdownj compiled from trunk.
Here's class to reproduce it:
The printed strings are
and
I tracked the problem down to
runSpanGamut()
andescapeSpecialCharsWithinTagAttributes()
. The latter tried to get text between < and > and replace special chars within those tokens, but the tokenizing is going wrong.I noticed that in the original markdown
runSpanGamut()
does the code spans first and then does the special chars, so unless they've been swapped for some other reason, that's probably the way to fix it. OtherwiseTextEditor.tokenizeHTML()
will need to do a better job.I've previously reported this to alex via email, but got no response.
Original issue: http://code.google.com/p/markdownj/issues/detail?id=19
The text was updated successfully, but these errors were encountered: