Open sukhmel opened 5 months ago
Thanks for the detailed report! Markdown itself doesn't officially support subscript or superscript tags (see https://github.com/flutter/flutter/issues/81717) so this had to be implemented manually 😅
Just a quick update - I tried a couple of changes on my end to see if I could fix this issue easily, and it seems like its going to take some effort to get this to work properly.
This is what I believe is happening at the moment:
I tried to parse both the preceding text and super/subscript text together to get past that issue with it breaking into the next line, but this completely breaks markdown formatting for the preceding text (e.g., bolded text gets shown as raw markdown). This also causes another similar issue with line breaking if there are multiple super/subscripts in a single paragraph.
Bug Description
When subscript text is inputted with
~text~
after long enough text without breaks, a post renders with a line break before that textExpected Behaviour
There should be no extra line break
Steps to Reproduce
Post a text like
. .~s~
, you may need to adjust amount of spacesAdditional Context
It seems to depend on screen size and interface size settings:
Extra line break depends on visible text size, not on a character count, so I suppose that's a rendering bug rather than some markdown engine bug. But I know nothing of Thunder internals, so this might as well be nonsensical statement 😅
* I would argue that it should take the preceding text to the next line if there is no space before subscipt, i.e. not put line break between
text~index~
but allow to breaktext ~index
. That's a bit tangential to the issue, though.App Version
0.3.0-1
Device
Pixel 8 Pro
OS
Android 14 kernel 5.15.110-android14-11-gcc48824eebe8-ab10865596