Bug 497611 - Certain character and format patterns cause some formatting asterisks to be highlighted, and some text to appear faded (on the editor side)
Summary: Certain character and format patterns cause some formatting asterisks to be h...
Status: CONFIRMED
Alias: None
Product: ghostwriter
Classification: Applications
Component: general (show other bugs)
Version: 24.12.0
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: megan.conkle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-17 16:00 UTC by goebbe
Modified: 2025-01-03 18:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenshot showing lowlighting issues for markdown in the md-editor (100.04 KB, image/png)
2024-12-17 16:00 UTC, goebbe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description goebbe 2024-12-17 16:00:59 UTC
Created attachment 176711 [details]
Screenshot showing lowlighting issues for markdown in the md-editor

SUMMARY
When editing .md files in ghostwriter, sometimes I observe rendering issues concerning the lowlighting/ greylighting of the actual markdown.

OBSERVED RESULT
 Sometimes the lowlighting seems to be some letters off - as a result, sometimes the markdown is not lowlighted and sometimes the actual text or parts of the actual text is lowlighted. 

EXPECTED RESULT
Expected result: Only the markdown marks are actually lowlighted, but the very text of the document is rendered normally.

STEPS TO REPRODUCE
1.  Put text starting with markdown at the start of a new line **a**
2. The markup and only the markup "**" should be lowlighted
3. However, sometimes this does now work as expected (screenshot is attached) 

Text to reproduce the issues - for copy and pasting to ghostwriter: 

#### normal and italic:
 a   o   u
 ä   ö   ü
*a* *o* *u*    <- highlighting in md seems reversed
*t* *s* *w*
*ä* *ö* *ü*    <- different rendering with single umlauts (diacritics)
 aa   oo   uu   uu
*aa* *oo* *uu* *uu*  <- issue with the markdown - no umlauts involved!!
*äa* *oö* *uü* *uü*  <- different rendering for first and last position>
*aä* *öo* *üu* *üu*
*aaa* *ooo* *uuu* 
*aäa* *oöo* *uüu*    <- no issue when umlauts are in the middle of a word

*aaa* *ooo* *uuu*    <- after an empty line


#### nomal and bold:
 a   o   u
 ä   ö   ü
**a** **o** **u** 
**ä** **ö** **ü**
**aa** **oo** **uu** 
**äa** **öo** **üu**
**aä** **oö** **uü**
**aaa** **ooo** **uuu** 
**äaa** **öoo** **üuu**
**äaä** **öoö** **üuü**
**aäa** **oöo** **üuü**
Comment 1 John Kizer 2024-12-29 01:44:59 UTC
Hi - I wanted to check, are you able to reproduce these issues when typing those characters directly into the editor?

I'm asking as I can't reproduce any of the highlighting glitches when typing them straight in, but can reproduce one of them (first asterisk on a line - but not the others) when pasting from the Bugzilla description here into ghostwriter on Fedora KDE 41. I thought that may be a relevant distinction if that's the case for you as well.

Thanks!
Comment 2 goebbe 2025-01-03 11:00:29 UTC
@John Kitzer  Thanks for looking into this. 

You are right: When typing my example text (not copy/paste), most of the rendering is fine, directly after typing. 
- However, some rendering issues appear, as soon as the newly typed text is copied/ pasted - even though, in this case, the rendering issues are different and only concern the first asterix on a line.

- Sometimes these type of rendering issues appear even without copying pasting - however I will try to come up with reproducible examples and add another comment. 

- Just copying my example text from my first post to ghostwriter - I am still able to reproduce the rendering issues from the attached screenshot.
- The rendering issues seem to re-appear when save/ restart ghostwriter / reopen the file.
Comment 3 goebbe 2025-01-03 11:14:06 UTC
Reproduce rendering issues with leading asterix (*), when typing text (no copy/paste involved):
1. Open a new file and type the following text (two lines):
*a* *
a 
2. Now go back to the first line and delete the last asterix using the DEL key

Another one:
1. Open a new file and type the following text (two lines) - there are 4 leading white spaces in the first line: 
    *a*
a
2. Now go back to the first line and delete the leading 4 white spaces
Comment 4 goebbe 2025-01-03 11:32:10 UTC
Another interesting one:
1. Open a new file and type the following text (three lines) - it is important to start with a whitespace " " in the first line, followed by an umlaut e.g. "ä" (note the two points above the "a" - the same issue appears when using e.g. a French accented "é" instead). Important: There is NO whitespace in the second and third line:
 ä
**a**
**ä**
2. The rendering issues are immediately visible.
Comment 5 John Kizer 2025-01-03 18:12:47 UTC
Thanks!