https://bugs.kde.org/show_bug.cgi?id=399278
Bug ID: 399278 Summary: The highlights for the two trailing spaces in markdown documents unrecoverably disappear after changing an related option Product: kate Version: 17.12.0 Platform: Ubuntu Packages OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: kwrite Assignee: kwrite-bugs-n...@kde.org Reporter: k...@outlook.com Target Milestone: --- WHAT SHOULD HAPPEN In Markdown, two spaces at the end of a line means a line break. A newly installed Kate will show two underlines `__` indicating the two spaces. WHAT HAS HAPPENED The `__` render disappears unrecoverably after changing the option "Highlight trailing spaces". With that option, Kate will be able to render with a sizeable dot like `·` for a trailing space. STEPS TO REPRODUCE 1. A newly installed Kate is required. 2. Create a file and save it as `filename.md` with contents below: ``` This is a line with two trailing spaces (two spaces here ->). The two trailing spaces means a line break (two spaces here ->). And this is a line without trailing spaces (no spaces here). A raw line break in a Markdown file acts a space (no spaces here). ``` 3. (EXPECTED RESULT) You will see the highlights like this: ``` This is a line with two trailing spaces (two spaces here ->).__ The two trailing spaces means a line break (two spaces here ->).__ And this is a line without trailing spaces (no spaces here). A raw line break in a Markdown file acts a space (no spaces here). ``` 4. Then tick the checkbox at Setting -> Configure Kate -> (left column) Editor Component -> Appearance -> (right column) Whitespace Highlighting -> Highlight trailing spaces. Apply your setting. 5. You will see the highlight like this: ``` This is a line with two trailing spaces (two spaces here ->).·· The two trailing spaces means a line break (two spaces here ->).·· And this is a line without trailing spaces (no spaces here). A raw line break in a Markdown file acts a space (no spaces here). ``` Well, for now, it seems that Kate does well because it does render the trailing space with the dot as in the Settings. BUT, if I want to switch back to the underline rendering, I find it UNRECOVERABLE. 6. Untick the checkbox at Setting -> Configure Kate -> (left column) Editor Component -> Appearance -> (right column) Whitespace Highlighting -> Highlight trailing spaces. Apply your setting. 7. (OBSERVED RESULT) You will find the highlights `__` disappear unrecoverably: ``` This is a line with two trailing spaces (two spaces here ->). The two trailing spaces means a line break (two spaces here ->). And this is a line without trailing spaces (no spaces here). A raw line break in a Markdown file acts a space (no spaces here). ``` MY SPECULATION THAT MAY HELP The `__` rendering is a part of language-specified highlights and the `·` rendering is a part of system-wide highlights. This two options are conflict with each other and adjusting the latter disables the former. SOFTWARE VERSIONS KDE Plasma Version: 5.12.6 KDE Frameworks Version: 5.44.0 Qt Version: 5.9.5 Thanks. -- You are receiving this mail because: You are watching all bug changes.