Corewala / Buran

Gemini browser for Android
GNU General Public License v3.0
107 stars 10 forks source link

Headers without leading space don't render the first character #16

Closed acidus99 closed 2 years ago

acidus99 commented 2 years ago

Buran 1.8 (and probably earlier) is not properly rendering Header lines that don't use whitespace between the # and the header text.

According to the Gemtext spec, whitespace after the # in a header is optional:

Lines beginning with "#" are heading lines. Heading lines consist of one, two or three consecutive "#" characters, followed by optional whitespace, followed by heading text.

But saw this while browsing:

image Here is the gemtext:

#New things with the capsule
##New Hosting Provider
The ...

gemini://tilde.team/~smokey/logs/2022-05-25-new-things.gmi

Looks like Buran is assuming there is whitespace after the '#' and skipping the first character of the text

Corewala commented 2 years ago

Huh. The adapter code was trying to cut off an additional character, despite calling "trim()" anyways. Fixed.