-
-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Italics nested in bold are not bold in preview #3218
Comments
The generated HTML is correct, @Waqar144, can you maybe remember something about that? |
This used to work IIRC. The style needs to be merged with existing style. So if bold exists, the italic should merge with bold instead of overwriting. This is definitely a markdownhighlighter bug |
Thank you. The highlighting in the editor works in the way it should, it's only the preview. I'll look into it. |
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
I fixed the CSS styles, but the QTextBrowser still is rendering the combination wrong. |
By adding styles for all permutations |
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
25.1.6
|
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
There now is a new release, could you please test it and report if it works for you? |
Great, thank you for testing! 😉 |
Expected behaviour
Italics and bold combine when italics are nested inside bold.
Like this example (rendered using GitHub Markdown):
**bold *and italic***
-> bold and italicActual behaviour
The nested italic just looks like regular italic (in the preview window):
It looks fine in the editor, though.
Steps to reproduce
Steps to reproduce the behavior:
Copy and paste this text (
**bold *and italic***
) to a note in QOwnNotes, and look at the preview window.It looks fine in the editor, but not the preview window.
Proposed solution
Separate the theming for 'bold & italic' from 'bold' and 'italic' in the editor theming.
Another popular note-taking app (Obsidian) uses this approach, which I find works quite well.
It also allows for the combination to have a different color than either others, which would allow for more freedom.
The text was updated successfully, but these errors were encountered: