# Bbcode block vs inline rule parsing

**URL:** https://meta.discourse.org/t/bbcode-block-vs-inline-rule-parsing/383843
**Category:** Bug
**Tags:** bbcode
**Created:** [September 24, 2025, 6:35am UTC](https://meta.discourse.org/t/bbcode-block-vs-inline-rule-parsing/383843 "2025-09-24T06:35:49Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![panic](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@panic](https://meta.discourse.org/u/panic)
#### Post date: [September 24, 2025, 6:35am UTC](https://meta.discourse.org/t/bbcode-block-vs-inline-rule-parsing/383843/1 "2025-09-24T06:35:49Z")

</div>

Some bbcode rules (e.g. `[code]`, `[spoiler]`) can be treated as block or inline rules. Currently, if a line begins with e.g. `[code]` and ends with `[/code]`, the line is parsed as a block rule. Sometimes this behaviour is not intended.

For example, the line  
`[code]123[/code] 456 [code]789[/code]`  
is rendered

```plaintext
123[/code] 456 [code]789
```

and not

`123` 456 `789`.

Likewise,  
`[spoiler]123[/spoiler] 456 [spoiler]789[/spoiler]`  
is

123[/spoiler] 456 [spoiler]789

and not

123 456 789.

Is this intended or a bug?

---

_[View the full topic](https://meta.discourse.org/t/bbcode-block-vs-inline-rule-parsing/383843)._
