<code> is a tag used for code, including filepaths and other text a computer would recognize. <pre> is used to preserve the whitespace, useful for multi-line code (among other things like ASCII art). While code can simply be put in a <pre> tag, it seems to be recommended to use a <code> tag, with a <pre> tag around it when declaring a multi-line code block.
Many extensions already use <code> in documentation, this commit standardizes it for consistency.
This commit also moves the theming for code out of the bbcode extension and into themes. This allows it to be used in other places <code> is used, like in extensions documentation. It also allows themes to customize code CSS (such as the default theme, which previously made it the same colour as the background)
<code>
is a tag used for code, including filepaths and other text a computer would recognize.<pre>
is used to preserve the whitespace, useful for multi-line code (among other things like ASCII art). While code can simply be put in a<pre>
tag, it seems to be recommended to use a<code>
tag, with a<pre>
tag around it when declaring a multi-line code block.Many extensions already use
<code>
in documentation, this commit standardizes it for consistency.This commit also moves the theming for code out of the bbcode extension and into themes. This allows it to be used in other places
<code>
is used, like in extensions documentation. It also allows themes to customize code CSS (such as the default theme, which previously made it the same colour as the background)