Hello,

on Tuesday 14 March 2017 at 15:44, Mark Janssen wrote:
> I did notice a (IMO) bug during the conversion:
> 
> $ cat markdown-test2.md
> _test\_embedded_
> *test\*embedded*
> $ fossil test-markdown-render markdown-test2.md
> <div class="markdown">
> 
> <p><em>test</em>embedded_
> <em>test</em>embedded*</p>
> 
> </div>
> 
> The escaped delimiters (\_ and \*) terminate the <em> but they shouldn't.

I completely agree that this is a bug, and I'm very ashamed by it.

In case somebody with more commit fluency than me wants to commit the
fix, it's in markdown.c, almost at the beginning of the function
`find_emph_char`, the line `if( data[i]==c ) return i;` should be moved
blow the block `if( i && data[i-1]=='\\' ){`.

As of this writing (head of trunk is 6f52316955), that's line 464 to
move after the closing brace of line 470.

If nobody beats me to it, and if I still have some commit rights, and if
I figure whether it should go directly to trunk or into a to-be-reviewed
branch (I'm very confident in the fix, but I might not be trusted enough
to muddle directly with trunk yet), I will commit the fix myself.


Thanks a lot for the report and sorry for the inconvenience,
Natacha
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to