Markdown files with CR LF line endings instead of LF do not create mermaid output #26

Closed
opened 2022-11-25 14:34:01 +00:00 by pseiko1989 · 1 comment
pseiko1989 commented 2022-11-25 14:34:01 +00:00 (Migrated from github.com)

Markdown files with CR-LF line endings will only create an empty

<pre class="mermaid">
</pre>

instead of the code block.

It should be possible to verify it with the following files:
test_cr_lf.md
test_lf.md

The cause of this may be that events.into_offset_iter() in https://github.com/badboy/mdbook-mermaid/blob/main/src/lib.rs#L64
returns the mermaid content line by line instead of in one big chunk.

Markdown files with CR-LF line endings will only create an empty ```html <pre class="mermaid"> </pre> ``` instead of the code block. It should be possible to verify it with the following files: [test_cr_lf.md](https://github.com/badboy/mdbook-mermaid/files/10093495/test_cr_lf.md) [test_lf.md](https://github.com/badboy/mdbook-mermaid/files/10093496/test_lf.md) The cause of this may be that events.into_offset_iter() in https://github.com/badboy/mdbook-mermaid/blob/main/src/lib.rs#L64 returns the mermaid content line by line instead of in one big chunk.
badboy commented 2022-11-25 15:33:21 +00:00 (Migrated from github.com)

PRs welcome. I don't have CRLF line endings, so I'm not too eager to investigate this right now.

PRs welcome. I don't have CRLF line endings, so I'm not too eager to investigate this right now.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jer/mdbook-mermaid#26
No description provided.