~lioploum/offpunk-devel

1

Bug ? html/gmi: empty lines are not displayed in preformatted text

Details
Message ID
<4b227d6b-168e-4845-b66c-3fe561a0e47e@zaclys.net>
DKIM signature
pass
Download raw message
Hi, and thanks for this awesome work !

I think blank lines in preformatted blocks are not rendered for html an 
gmi files.

I have some songs on my capsule that are not rendered correctly.
I set them in a preformatted block because :
- I don't want lines to be wrapped
- I want a monospace font to be used so chords are aligned with lyrics
- I want empty lines to be displayed as a separation between verses and 
chorus : Offpunk bugs on this last point.

For example on this song :

=> http://matograine.fr/chants/d/petit-fils-d-oedipe-Brassens.html
=> gemini://matograine.fr/chants/d/petit-fils-d-oedipe-Brassens.gmi

The first two verses are rendered as so :

 > Papa m'envoie quérir cent sous de mortadelle.
 > Empochant la monnaie, moi je file au bordel.
 > "Où vas-tu mon garçon de cette allure fougueuse ?"
 > Me lance grand-maman. "Je vais courir la gueuse."

while they should be (as you can see in other browsers):

 > Papa m'envoie quérir cent sous de mortadelle.
 > Empochant la monnaie, moi je file au bordel.
 >
 > "Où vas-tu mon garçon de cette allure fougueuse ?"
 > Me lance grand-maman. "Je vais courir la gueuse."

I think the problem is in the _endline() function, that will erase any 
blank line. But I don't see how to fix it, since blank lines have to be 
dismissed in most cases.

Sincerely,

Matograine
Details
Message ID
<173606946857.8.13322667809654997305.554398926@ploum.eu>
In-Reply-To
<4b227d6b-168e-4845-b66c-3fe561a0e47e@zaclys.net> (view parent)
DKIM signature
pass
Download raw message
Le 25 jan 02 01:59, matograine a écrit :
>Hi, and thanks for this awesome work !
>
>I think blank lines in preformatted blocks are not rendered for html 
>an gmi files.

That’s right, it looks like a bug.

This has proven to be a very tricky part of the code. I’m not currently 
able to work on this but feel free to open a ticket.

I would gladly accept a patch that fixes this (but beware of regression)

>
>I have some songs on my capsule that are not rendered correctly.
>I set them in a preformatted block because :
>- I don't want lines to be wrapped
>- I want a monospace font to be used so chords are aligned with lyrics
>- I want empty lines to be displayed as a separation between verses 
>and chorus : Offpunk bugs on this last point.
>
>For example on this song :
>
>=> http://matograine.fr/chants/d/petit-fils-d-oedipe-Brassens.html
>=> gemini://matograine.fr/chants/d/petit-fils-d-oedipe-Brassens.gmi
>
>The first two verses are rendered as so :
>
>> Papa m'envoie quérir cent sous de mortadelle.
>> Empochant la monnaie, moi je file au bordel.
>> "Où vas-tu mon garçon de cette allure fougueuse ?"
>> Me lance grand-maman. "Je vais courir la gueuse."
>
>while they should be (as you can see in other browsers):
>
>> Papa m'envoie quérir cent sous de mortadelle.
>> Empochant la monnaie, moi je file au bordel.
>>
>> "Où vas-tu mon garçon de cette allure fougueuse ?"
>> Me lance grand-maman. "Je vais courir la gueuse."
>
>I think the problem is in the _endline() function, that will erase any 
>blank line. But I don't see how to fix it, since blank lines have to 
>be dismissed in most cases.
>
>Sincerely,
>
>Matograine




-- 
Ploum - Lionel Dricot

Blog: https://www.ploum.net
Bikepunk: https://bikepunk.fr/
Reply to thread Export thread (mbox)