Code snippets in posts are recognised and wrapped in <pre> and <code> elements, but then the <pre> element is escaped to HTML entities ("<pre>") and thus ends up being displayed as the literal text "<pre>" and "</pre>" before and after the code segment. As a result, the lines of the code segment run into each other as an undifferentiated blob, making them hard to decypher.
For example, the actual text that is written like this:
Code: Select all
elseif vrn.results then
if vrn.results[1].type == "item" or vrn.results[1].type == "fluid" then
table.insert(newicons,{icon=data.raw[vrn.results[1].type][vrn.results[1].name].icon})
end
To fix this, either the <pre> element needs to be inserted unescaped, or it could be left out and instead the style of the <code> element could receive the property white-space: pre; or white-space: pre-wrap;.<pre>elseif vrn.results then if vrn.results[1].type == "item" or vrn.results[1].type == "fluid" then table.insert(newicons,{icon=data.raw[vrn.results[1].type][vrn.results[1].name].icon}) end</pre>