Add documentation about escaping blocks in doc/BBCode

This commit is contained in:
Hypolite Petovan 2020-06-04 21:17:27 -04:00
parent 31d6a6157c
commit a132a21da7

View file

@ -613,15 +613,26 @@ On Mastodon this field is used for the content warning.
<th>Result</th> <th>Result</th>
</tr> </tr>
<tr> <tr>
<td>If you need to put literal bbcode in a message, [noparse], [nobb] or [pre] are used to escape bbcode: <td>If you need to put literal BBCode in a message, [noparse], [nobb] or [pre] blocks prevent BBCode conversion:
<ul> <ul>
<li>[noparse][b]bold[/b][/noparse]</li> <li>[noparse][b]bold[/b][/noparse]</li>
<li>[nobb][b]bold[/b][/nobb]</li> <li>[nobb][b]bold[/b][/nobb]</li>
<li>[pre][b]bold[/b][/pre]</li> <li>[pre][b]bold[/b][/pre]</li>
</ul> </ul>
Note: [code] has priority over [noparse], [nobb] and [pre] which makes them display as BBCode tags in code blocks instead of being removed.
[code] blocks inside [noparse] will still be converted to a code block.
</td> </td>
<td>[b]bold[/b]</td> <td>[b]bold[/b]</td>
</tr> </tr>
<tr>
<td>Additionally, [noparse] and [pre] blocks prevent mention and hashtag conversion to links:
<ul>
<li>[noparse]@user@domain.tld #hashtag[/noparse]</li>
<li>[pre]@user@domain.tld #hashtag[/pre]</li>
</ul>
</td>
<td>@user@domain.tld #hashtag</td>
</tr>
<tr> <tr>
<td>[nosmile] is used to disable smilies on a post by post basis<br> <td>[nosmile] is used to disable smilies on a post by post basis<br>
<br> <br>