BBCode [quote] tag and mixed newlines

Hello.

On a forum using Discourse 2.2.0.beta2, while writing PM or public posts, I’ve got some strange behavior with quotes and newlines ; “strange” for someone used to BBcode on classical phpBB-like forums. Is this a bug or a desired/designed behaviour ?

I’ll try to reproduce it here (2.2.0.beta5 now).

The syntax correctly displayed is either:

[quote]Without any newline between opening and closing tags.[/quote]

or

[quote]
With newlines after the opening tag and before the closing [/code]tag.
[/quote]

But if both forms are mixed, then it’s not “correctly” displayed (“correctly” for someone used to BBcode on classical forums) :

[quote]
With newline after opening tag only.[/quote]
 
[quote]With newline before closing tag only.
[/quote]

is “badly” displayed like this

and

[quote]With newline before closing tag only.
[/quote]

[quote]
With newline after opening tag only.[/quote]

is even more “badly” displayed without interpretation

[quote]With newline before closing tag only.
[/quote]

[quote]
With newline after opening tag only.[/quote]

1개의 좋아요

Yes, this is a known limitation of our parser. [quote] always require newlines before and after to work.

2개의 좋아요

OK, thanks for your answer.

Well, except in this case :
[quote]blabla[/quote]

:wink:

1개의 좋아요

This is covered in several other existing topics. You cannot mix line endings with BBCode [quote]. Either all on one line, or all on different lines.

3개의 좋아요

여전히 관련이 있습니다!

[/quote]2022년에 여기에서 답변을 계속하면 인용구와 게시물이 손상됩니다.

이 제한 사항에 대한 더 자세한 정보가 편집기에 도움이 될 것입니다. 미리보기에는 손상된 인용구가 표시되지만 "왜 이런 일이 발생했는지"와 "인용구를 수정하는 방법"에 대한 텍스트는 표시되지 않습니다.

2개의 좋아요