badboy / mdbook-mermaid

A preprocessor for mdbook to add mermaid support
Mozilla Public License 2.0
306 stars 32 forks source link

Handle CR-LF in mermaid #27

Closed pseiko1989 closed 1 year ago

pseiko1989 commented 1 year ago

mermaid blocks containing CR LF are returned line by line from the parser instead of as a complete code chunk for LF only. We need to expand the span for each chunk we get. After the closing ticks we replace the remaining \r\n with \n to have a consistent line ending in the mermaid code at least.

fixes #26