Closed mekhontsev closed 3 years ago
Thanks, will take a look
OK. I've just pushed the second commit with other corner cases.
Many thanks for the PR!
I have merged this into branch dev_pr18 and will get @juliettef to do some further testing before merging to master & dev
I've made a few changes from your PR:
#include "imgui.h"
- you should do that in your own code before including this#ifndef IMGUI_MARKDOWN_LESS_NEWLINES
- formatting changes should be handled by creating your own formatCallback*
character is found, which handles an edge case of no characters or newline after the emphasis.As you can see from my commit history on this branch there has been a fair amount of work in fixing edge cases: https://github.com/juliettef/imgui_markdown/commits/dev_pr18
I've also removed the escape \
character - this isn't part of default markdown and it caused issues - a full escape implementation would need to check that the following character is an action token character and ignore that, otherwise treat as a normal \
such as in C:\Windows\
Note that the multiline emphasis turned out to be difficult to get to work properly, so I've removed this for now - this also simplifies the code a lot.
This patch adds support of