https://bugs.kde.org/show_bug.cgi?id=495147
Bug ID: 495147 Summary: ghostwriter markdown highlighting fails for fenced code blocks attributes with non ASCII characters Classification: Applications Product: ghostwriter Version: 23.08.5 Platform: Kubuntu OS: Linux Status: REPORTED Severity: minor Priority: NOR Component: general Assignee: megan.con...@kdemail.net Reporter: christophe.agat...@gmail.com Target Milestone: --- SUMMARY The markdown editor displays code blocks on a lighter background than regular text (assuming dark theme). When editing pandoc markdown, one can set attributes to the code block. Ghostwriter highlighting is OK with that unless there is at least one non-ASCII character in them. In this scenario it seems to simply ignore the opening fence and start to apply the lighter background starting with the closing fence until it find the end of file or another fence. STEPS TO REPRODUCE 1. Create a markdown document with the following markdown content : Here is some code : ~~~~~~~ {title = "Code numéro 1"} if (a > 3) { moveShip(5 * gravity, DOWN); } ~~~~~~~ Here is the same code once again : ~~~~~~~ {title = "Code numéro 2"} if (a > 3) { moveShip(5 * gravity, DOWN); } ~~~~~~~ This is it. OBSERVED RESULT The markdown text is displayed on the regular background from the beginning to the last line of code of the first code block (lines 1 to 6). The code block background is used from the closing fence of the first block to the closing fence of the second block (lines 7 to 15). Back to regular background for the end of the text (lines 16 and 17) In short both opening fences are ignored by the markdown syntax highlighting system. EXPECTED RESULT Code block background from opening fence to closing fence for each code block. SOFTWARE/OS VERSIONS Windows: macOS: (available in the Info Center app, or by running `kinfo` in a terminal window) Linux/KDE Plasma: Kubuntu 24.04 KDE Plasma Version: 5.27.11 KDE Frameworks Version: 5.115.0 Qt Version: 5.15.13 ADDITIONAL INFORMATION Everything is OK in the editor if there are ASCII characters only in the attributes (eg "Code #1" instead of "Code numéro 1") Might be related [#487636](https://bugs.kde.org/show_bug.cgi?id=487636) -- You are receiving this mail because: You are watching all bug changes.