extend markdown syntax support (tables and code)#43
Conversation
|
Once again thanks for this Martin! Excellent stuff at first glance, the output looks really good. I note that this doesn't use a config flag, I think we may need to add these for table and code support otherwise it may introduce formatting where there was none before and I want to keep backwards compatibility. Note (as per previous PR): it may take a while to review PRs at the moment as I'm extremely busy for a few weeks. Additionally I think I need to create a simple example and test suite before extending imgui_markdown too much, as the intention is to be both lightweight and fast. |
|
This is great stuff! I gave this a spin and found a couple of issues.
Below is a markdown and its rendering showing issues 1 - 3. |
|
Issue 1 can potentially be fixed by guarding against emphasis on line ~781: Previously: Potential fix: |
|
Hi, thank you for your great work! My question: are you implementing only inline code, or also fenced code block? Your code seems to be supporting only inline code. List of issues found: Fenced code block — language tag is visible and rendered as code, then the following lines are rendered as NORMAL_TEXT Input: x = 1 Expected: language tag discarded, x = 1 rendered as CODE Inline code in table cells — backtick characters appear literally; isTableRow skips all inline parsing Input:
Expected: init() rendered as CODE inside the cell |

see #17
also added hand cursors to the link handling.
there are a few whitespace issues in the header file - some indentations are made with spaces and some with tabs. This sometimes makes it hard to follow the code paths.
Table rendering
... showing the markdown from https://github.com/vengi-voxel/vengi/blob/master/docs/Formats.md
Code rendering
... showing the markdown from https://github.com/vengi-voxel/vengi/blob/master/docs/Palette.md