Bug with "highlight" BBCode tag
When the first line of a code block has indentation, the "highlight" tag removes it, while the "code" tag does not. Compare:
Code:
if UnitIsUnit(unit, "player") then Lua Code:
|
Looks like [highlight] is trimming all whitespace at the beginning of the code while [code] only checks for a newline at the beginning, subsequent newlines are left alone. Both of them trim all whitespace at the end of the code, which is probably a good thing.
If I had to guess, it seems like the original programmer of the parser wanted to reset the baseline indentation in [highlight], but couldn't figure out how to fully implement it. |
I just noticed [highlight] also turns tab characters into spaces, which is also undesirable IMO. If I'm posting code, I want to to be displayed as written -- otherwise I'd have written it differently.
|
Though if you quote with your reply, the original text retains tabs if they were used.
|
All times are GMT -6. The time now is 12:07 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI