rjeschke / txtmark

Yet another markdown processor for the JVM
Apache License 2.0
449 stars 100 forks source link

Back ticks fail to terminate a meta named fenced codeblock. #55

Open grosenberg opened 7 years ago

grosenberg commented 7 years ago

Added a custom block emitter to process blocks like


``` dot

digraph M1{ 
    node[shape=box width=1.1]
    dot[label="Graphviz\nDOT"]
    zestCode[label="Zest\ngraph"]
    zestVis[label="SWT\napp"]
    image[label="Image\nfile"]

    dot->image//[label=" Graphviz"]
    dot->zestCode[constraint=false color=black style=dashed label="            " dir=both]
    zestCode->zestVis//[label=" Zest"]  
}

~~~

Problem is that when the trailing delimiter of the code block is three back-ticks: ```, the list of lines delivered to the custom BlockEmitt#emitBlock includes every line from the first line of fenced code to the end of the document.

If the trailing delimiter is changed to ~~~, as show above, TxtMark behaves correctly.

If the custom block emitter is not used, the problem remains when using the trailing back-tick delimiter.

Suggests that something in this Dot content is messing with TxtMark. Just don't see what it is.