You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With text value set to \n and markdown ranges set to [{ type: "pre", start: 0, length: 1 }] there's no visible styling. Adding another new line and extending the range, second line is styled correctly.
Context: I'm implementing a WYSIWYG rich text editor on top of live-markdown and when toggling code block there's no visual indication if it's the first line. Once the user starts typing styling is applied correctly, so this isn't a blocker.
Apparently empty lines in a code block aren't styled at all on Android, regardless of whether it's the first line or not.
I'll have to test on Android more often.
Apparently empty lines in a code block aren't styled at all on Android, regardless of whether it's the first line or not.
Yes, that's correct, the background color is applied only under text, not under the whole block as a rectangle. There are no characters in an empty line so there's no background.
Activity
tomekzaw commentedon Mar 11, 2025
Hi @OzymandiasTheGreat, thanks for reporting this issue.
I'm afraid newlines can't be styled that easily.
What platform does this issue report refer to?
OzymandiasTheGreat commentedon Mar 11, 2025
This happens on iOS (simulator).
For some reason I didn't think to try on Android, I'll try and report back.
OzymandiasTheGreat commentedon Mar 11, 2025
Apparently empty lines in a code block aren't styled at all on Android, regardless of whether it's the first line or not.
I'll have to test on Android more often.
tomekzaw commentedon Mar 11, 2025
Yes, that's correct, the background color is applied only under text, not under the whole block as a rectangle. There are no characters in an empty line so there's no background.
tomekzaw commentedon Mar 11, 2025
There's a PR by @maksg that should add proper background underneath codeblocks but it has been abandoned for quite some time now: #338