Closed handsomematt closed 3 years ago
Thanks for the suggestion, I'll take a look.
I've added support for this on the dev branch. To preserve behaviour this requires the ImGui::MarkdownConfigFlags_mdStyleHardLineBreak flag in MarkDownConfig flags.
I've removed this support - sadly it breaks too much of the rest of the code.
Our implementation doesn't allocate any memory and can't modify the contents of the string, so removing line returns is awkward requiring lots of preserved state.
We've decided this is simply a limitation you'll need to be aware of, and if required pre-process any standard markdown to remove line returns if they are not preceded by two spaces.
In most Markdown implementations a line return isn't added unless there are two empty spaces at the end of a line. This lets you wrap your markdown file nicely in your editor whilst also allowing your end viewer to wrap it accordingly.