Page MenuHomePhabricator

DiscussionTools: Wrong rendering of the new sub-comments with <pre>
Closed, DuplicatePublicBUG REPORT

Description

When using <pre> in an indented (:-prefixed) comment, the tag is terminated prematurely after the first line of the content definition in pre.

See you (URL: https://test.wikipedia.org/wiki/Talk:Sadsda):

2022-09-22.png (768×1 px, 105 KB)

(The reply tool automatically prefixes the text with colons in the preview to imitate what will happen after saving.)

Event Timeline

Tacsipacsi subscribed.

This is not related to DiscussionTools, it’s how <pre> works, and used to work for as long as I remember. The preview shown by DiscussionTools correctly shows that it will be broken after saving. If anywhere, it should be fixed in the core parser, but I’m not sure if it will ever be. In the meantime, you can use <syntaxhighlight lang="text">.

No, it isn’t. The main issue is not that the colons are added, but that an indented <pre> doesn’t allow multi-line content at all, whether all-but-the-first lines start with colons or not. The following content (assuming that not drafted with the reply tool, i.e. no extra : prefixes are applied) is also broken:

:<pre>one
two
three</pre>

(actually even slightly more broken, as two and three get outdented).

Dusan_Krehel renamed this task from DiscussionTools: Wrong rendering of the new comment with <pre> to DiscussionTools: Wrong rendering of the new sub-comments with <pre>.Sep 23 2022, 8:08 AM

Probably one of those things that's gated behind T246960 and us having an actual multi-line list item syntax?