Bug 461547 - Incorrect markup rendering with diacritics such as accents and umlauts
Summary: Incorrect markup rendering with diacritics such as accents and umlauts
Status: CONFIRMED
Alias: None
Product: ghostwriter
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: megan.conkle
URL:
Keywords:
: 461549 463032 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-11-07 14:05 UTC by goebbe
Modified: 2024-12-17 15:41 UTC (History)
2 users (show)

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


Attachments
Screenshot issue missplaced markdown with composed letters in gw (237.66 KB, image/png)
2022-11-07 14:05 UTC, goebbe
Details
Example md file for displaced markdown with composed letters (1.62 KB, text/markdown)
2022-11-07 14:07 UTC, goebbe
Details
Screenshot - illustration of issue - update (199.95 KB, image/png)
2024-01-10 20:47 UTC, goebbe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description goebbe 2022-11-07 14:05:48 UTC
Created attachment 153552 [details]
Screenshot issue missplaced markdown with composed letters in gw

SUMMARY
In some cases, the markup rendering seems to be displaced, when using composed Letters (e.g. German Umlauts) in a paragraph. 
The issue seems only to appear in a paragraph that follows after a newline.  

STEPS TO REPRODUCE
1. Write a few letters/ word and hit enter to go to a new line
2. In the new line, write some words, using Markdown. e.g. in bold or in italic. 
3. Type a composed letter, e.g. ä or é in this paragraph.

OBSERVED RESULT
The word in markdown (step 2) are not rendered correctly. It seems that the grey colour is applied one letter too late. 

EXPECTED RESULT
Typing composed letters should not affect the rendering of Markdown.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:   Linux Mint 21 CE
Ghostwriter Version: 2.2.0  (flatpak install) 
Qt Version: 5.15.3
Comment 1 goebbe 2022-11-07 14:07:00 UTC
Created attachment 153553 [details]
Example md file for displaced markdown with composed letters
Comment 2 megan.conkle 2022-12-22 21:15:41 UTC
*** Bug 463032 has been marked as a duplicate of this bug. ***
Comment 3 megan.conkle 2022-12-22 21:16:11 UTC
*** Bug 461549 has been marked as a duplicate of this bug. ***
Comment 4 goebbe 2023-04-20 06:24:51 UTC
There seem to be a couple of bug reports for composed letters (e.g. German umlauts, or French composed letters). 
Since all the bug reports have been closed, I tried to test again. 

- build ghostwriter from source (as of 2023.04.20).
- download and open the example file, attached to this bug

Result: The issue seems not to be fixed - at least in my build.  :-/
(maybe the issue is caused by one of the dependencies, outside ghostwriter - but I didn't find a hint on what is responsible for the issue) 

Therefore, I reopen the issue. Please feel free to comment and close, if I miss something.  

For a very quick test, I paste a part of the example file, here: 

Issues when highlighting (bold/ italic) text that contains Umlauts or accents: 
*Überschrift* **Überschrift**   <- first word should be italic, the second should be bold
*ä* *ö* *ü* *ß* *á* *â* *à*     <- all italic
**ä** **ö** **ü** **ß** **á** **â** **à**    <- all bold
**aä** **aäa** **dö** should_be_normal **üadfafasd**   <- mix bold and normal text
**äa** **aäa** **äa** **öfö** **üadfafasd**    <- all bold?
**aäa** **äa** **aäa** **öfö** **üadfafasd**   <- all bold, including the markup?
**Whateverö** normal text **final word**       <- the first word in the line should be bold
**Whateverö** normal text **öfinal word**    <- bold normal bold
Comment 5 goebbe 2023-04-20 06:57:21 UTC
There seem to be a couple of bug reports for composed letters (e.g. German umlauts, or French composed letters). 
Since all the bug reports have been closed, I tried to test again. 

- build ghostwriter from source (as of 2023.04.20).
- download and open the example file, attached to this bug

Result: The issue seems not to be fixed - at least in my build.  :-/
(maybe the issue is caused by one of the dependencies, outside ghostwriter - but I didn't find a hint on what is responsible for the issue) 

Therefore, I reopen the issue. Please feel free to comment and close, if I miss something.  

For a very quick test, I paste a part of the example file, here: 

Issues when highlighting (bold/ italic) text that contains Umlauts or accents: 
*Überschrift* **Überschrift**   <- first word should be italic, the second should be bold
*ä* *ö* *ü* *ß* *á* *â* *à*     <- all italic
**ä** **ö** **ü** **ß** **á** **â** **à**    <- all bold
**aä** **aäa** **dö** should_be_normal **üadfafasd**   <- mix bold and normal text
**äa** **aäa** **äa** **öfö** **üadfafasd**    <- all bold?
**aäa** **äa** **aäa** **öfö** **üadfafasd**   <- all bold, including the markup?
**Whateverö** normal text **final word**       <- the first word in the line should be bold
**Whateverö** normal text **öfinal word**    <- bold normal bold
Comment 6 megan.conkle 2023-07-26 07:51:21 UTC
My apologies.  I was indeed able to reproduce this.  It appears the bug only occurs when the umlaut is at the front or end of the marked up text (i.e., just after the first '*' or before the last '*').  Thanks for the info!
Comment 7 goebbe 2023-07-26 10:01:21 UTC
(In reply to megan.conkle from comment #6)
> My apologies.  I was indeed able to reproduce this.  It appears the bug only
> occurs when the umlaut is at the front or end of the marked up text (i.e.,
> just after the first '*' or before the last '*').  Thanks for the info!

Thanks for looking into this! Yes, you are right.  
I realize only now, that some of the cases, that I have originally reported have indeed already been fixed. This is, why some of the problems, illustrated in my original screenshots, are not present any more!
Comment 8 goebbe 2024-01-10 20:47:40 UTC
Created attachment 164798 [details]
Screenshot - illustration of issue - update

Since some of the cases are fixed, I tried to gather more cases, where the issue still occurs. The new screenshot illustrates the remaining issues.
Comment 9 goebbe 2024-01-10 20:49:13 UTC
Here Is the text that has been used for the new screenshot: 
Examples of issues when highlighting (bold/ italic) text that contains Umlauts or accents: 

*Überschrift* **Überschrift**                <- first italic, second bold?
*ä* *ö* *ü* *ß* *á* *â* *à* **               <- all italic?
**ä** **ö** **ü** **ß** **á** **â** **à**    <- all bold?
**aä** **aäa** **dö** should_be_normal **üadfafasd**   <- mix bold and normal text
**äa** **aäa** **äa** **öfö** **üadfafasd**   <- all bold?
**aäa** **äa** **aäa** **öfö** **üadfafasd**  <- all bold, including the markup?
**Whateverö** normal text **final word**      <- the first word should be bold
**Whateverö** normal text **öfinal word**     <- bold normal bold

*Whateverö* normal text *final word*          <- italic, normal, italic?
*Whateverö* normal text *öfinal word*         <- italic, normal, italic?
*Whateverö* normal text **öfinal word**       <- italic, normal, bold?
**Whateverö** normal text *öfinal word*       <- bold, normal, italic?

 a   o   u
*a* *o* *u* 
 ä   ö   ü
*ä* *ö* *ü*    <- single umlauts do not work

**a** **o** **u** 
**ä** **ö** **ü**

 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** aaa **aaa**
**aaa** aaa **aaä**
**aaä** aaa **aaä**
**aaa** aaa **äaa**  <- the aaa in the middle should be normal text
**aaa**aaaaa**äaa**  <- markdown is renderen differently, here
Comment 10 goebbe 2024-12-17 15:41:12 UTC
@megan.conkle@kdemail.net

I just tested with the latest flatpak build of ghostwriter 24.12.0 - and I am happy to report that my reported issues, concerning diacritics such as accents and umlauts are basically resolved. 

I checked my examples, provided in my last post: Independent of diacritics the actual text is set in bold or italics correctly. 

Therefore, as the original reporter, I recommend closing this issue. 
Whoever fixed this, thank you very much. 

There are (related?) issues with lowlighting/greylighting the actual markup (e.g. **) in the md editor. The issues are different when diacritics are involved. I will search/open a new issue and add an example file.