Comment tags for bbcode
Forum Index > Core > Suggestions > Completed >
Most coding languages let you block out a section of code with comment tags so that it is not implemented but remains in your written code. In html the comment tags are <!-- and -->
bbcode allows you to write text that will not be displayed between an end-line left bracket and the next right bracket, but there doesn't seem to be any sort of comment tag that allows you to write code that will not be read.
For example,
[accordion]
[a-section=Section 1]
This is the first section.
[/a-section][
][a-section=Section 2]
This is the second section.
[/a-section][
][a-section=Section 3]
This is the third section.
[/a-section]
[/accordion]
Normally dispalys like this:
If bbcode had a comment tag, let's say [* and /*], it would allow you to write that code this way:
[accordion]
[a-section=Section 1]
This is the first section.
[/a-section]
[a-section=Section 3]
This is the third section.
[/a-section]
[/accordion]
And have it display like this:
Which would allow you to hide code you're not currently needing to display, but that you want to keep for whatever reason. This would be helpful for organizing more complicated sections of code.
Say you have a trade shop with lots of bbcode and you want to temporarily close a section of it but reopen it later. This would let you block out that code without deleting it or having to remove it and save it somewhere else.
Section 1
This is the first section.
Section 2
This is the second section.
Section 3
This is the third section.
Section 1
This is the first section.
Section 3
This is the third section.
My avatar is my edit of official art from Pokémon X and Y.
Like the [nobbcode][/nobbcode] tags that already do exactly what you describe?
0 points
Mouse's Midnight Market! S/A/M sales, boxboxes, gem swaps, summon sales & more
Avatar art by me
No, Mouse, the difference is that any BBCode in between those tags would be hidden. [nobbcode] still shows text.
official project sekai art; icon is official TCG art
he/him + 22 + cstQUOTE originally posted by Gladion
No, Mouse, the difference is that any BBCode in between those tags would be hidden. [nobbcode] still shows text.
QUOTE originally posted by Mouse 13
QUOTE originally posted by Gladion
No, Mouse, the difference is that any BBCode in between those tags would be hidden. [nobbcode] still shows text.
That's rather odd, I wonder if that's how it was intended to work, or an overlooked mistake/bug?
Actually the nobbcode "tag" works separately, as an initial pass before any actual BBCode is processed. And all it does is replace all [ with [ - an escape code for the same symbol.
And since ] isn't [ it is unaffected by nobbcode.
Anyway. Great idea, can't believe we didn't have this already. Done.
Cannot post: Please log in to post