I’ve encountered an odd markdown markdown/bbcode bug.
Have a few lines of code in bbcode/markdown
[code]
line1
line2
[/code]
looks like
line1
line2
Quote them:
> [code]
> line1
> line2
> [/code]
looks like
line1 line2
A bug was reported where using BBCode [code] blocks inside blockquotes renders incorrectly, showing the raw [code] tags instead of properly formatted code. RGJ first described the issue, noting that quoting code blocks via the blockquote button produces malformed output. supermathie clarified the expected behavior — code should render as fenced code blocks (```) inside quotes. zogstrip initially misunderstood but later confirmed the bug stems from how Discourse parses BBCode blocks, particularly in nested contexts like blockquotes zogstrip. RGJ acknowledged it’s likely a BBCode-specific issue and noted that using Markdown fenced code blocks (```) instead of [code] works around the problem. The issue is slated to be fixed by this PR zogstrip.
I’ve encountered an odd markdown markdown/bbcode bug.
[code]
line1
line2
[/code]
looks like
line1
line2
> [code]
> line1
> line2
> [/code]
looks like
line1 line2
… and should look like:
line1 line2
escaped:
> ```
> line1
> line2
> ```
Can you tell me what browser / OS you’re using and how you’re quoting these lines?
Here’s how it looks on my end
which gives the correct markdown
[quote="Richard - Communiteq, post:1, topic:299047, username:RGJ"]
```
line1
line2
```
[/quote]
which renders as
Oh wait, I think I understand what you mean ![]()
[code]
line1
line2
[/code]
> on each line> [code]
> line1
> line2
> [/code]
Which renders (wrongly) as
line1 line2
Instead of
line1 line2
This is most likely an issue with the way we parse BBCode Blocks ![]()
Yeah, I already figured it was not a markdown issue per se but probably a bbcode issue.
The problem can be circumvented by using ``` instead of [code], as supermathie implicitly said in the second post.
Will be fixed by
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.