FS#67196 - Using markdown to create list items in comments causes other formatting to break

Attached to Project: AUR web interface
Opened by Keith Patton (kaipee) - Saturday, 04 July 2020, 23:21 GMT
Last edited by Eli Schwartz (eschwartz) - Sunday, 05 July 2020, 18:05 GMT
Task Type Bug Report
Category Backend
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 4.7.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I was adding a comment to https://aur.archlinux.org/packages/shutter when I noticed that all formatting stopped working on the comments table immediately after I inserted 2 list items using a single wildcard for markdown formatting.
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Sunday, 05 July 2020, 18:05 GMT
Reason for closing:  Not a bug
Additional comments about closing:  The nuances of four-space indentation caused confusion, but it seems nothing is actually wrong here. See comments.
Comment by Lukas Fleischer (lfleischer) - Sunday, 05 July 2020, 00:33 GMT
Thanks for the report, Keith! Could you please elaborate on what exactly you mean by "all formatting stopped working on the comments table"?
Comment by Keith Patton (kaipee) - Sunday, 05 July 2020, 10:59 GMT
Sure Lukas, if you check that link you will notice that all markdown formatting is tripped from the page. All code blocks, bold formatting, etc is displayed as a simple <p> tag without anything other tag or visual formatting.

Looking at my comment on that page, it looks as though the closing </ul> actually encompasses what should be a code block for the example I posted [yay -S $(pacman -Qqo '/usr/lib/perl5/5.30')].
Comment by Lukas Fleischer (lfleischer) - Sunday, 05 July 2020, 13:37 GMT
Can you point me directly to a comment where you think bold and/or code formatting has been stripped? None of the comments I looked at in this page have that formatting (even though many should have used it) and I just added code block formatting to one of the comments (PhilipC on 2020-06-26 16:40) manually to confirm that still works.
Comment by Eli Schwartz (eschwartz) - Sunday, 05 July 2020, 14:54 GMT
https://aur.archlinux.org/packages/shutter#comment-754546

The code formatting is in theory applied due to four-space indents, immediately after the "*" list bullets. But this four-space indent is removed, wrapped in a <p>, and contained within the second bullet point.

I *think* this might be the rules of markdown, though (what does an indent mean, anyway?). FWIW, I just always use ``` fenced code.

EDIT: yes, this presumably counts as a nested list.
Comment by Keith Patton (kaipee) - Sunday, 05 July 2020, 15:14 GMT
Hmm, I could have sworn that a number of the comments on that page (those outlining pacman output) had code block formatting.

I have modified my own comment to remove the list items and fix my code block - but none of the other comments are showing code block formatting...

example : https://aur.archlinux.org/packages/shutter/#comment-753041
Comment by Eli Schwartz (eschwartz) - Sunday, 05 July 2020, 15:23 GMT
That's because those don't use fenced code blocks (preferred) *or* four-space indents. If people don't add markdown formatting characters to their comments, then their comments will not be formatted as markdown.
Comment by Lukas Fleischer (lfleischer) - Sunday, 05 July 2020, 16:52 GMT
There are comments on page 2 that use code block formatting. My guess is that you saw one of them previously (on page 1), then that comment moved to page 2 when you added your comment.

Still good that you filed a report though, reporting too much is better than reporting too little. I guess this can be closed now or is there anything else we'd like to address?
Comment by Keith Patton (kaipee) - Sunday, 05 July 2020, 17:49 GMT
lol yes, the second page is probably what I was looking at in another tab now that I check it.

My own mal-formatting problem probably threw me.
Safe to close, thanks.

Loading...