bug/nested_bbtags

Feb 7, 2022 3:12 pm
Some tags allow nesting (quote for example), but most don't, and break if nested.

If would be useful if all tags allowed nesting.

The most pressing is probably the OOC tag. Quoting an OOC and replying to it is probably OOC action so the whole thing is marked as OOC, but the parts from the original post break the flow and have to be manually removed.

In the case of [ quote] and [ spoiler] it does the right thing. In the case of [ ooc] it should probably just ignore all inner OOCs and close at the last, but expecting them to be balanced is reasonable.

There may be some tags that don't make sense to be nested, they can either break (as they do now) if it not possible to make sense of the nesting, or get ignored.
Quote
Feb 7, 2022 4:06 pm
vagueGM says:
Some tags allow nesting (quote for example), but most don't, and break if nested.

If would be useful if all tags allowed nesting.

The most pressing is probably the OOC tag. Quoting an OOC and replying to it is probably OOC action so the whole thing is marked as OOC, but the parts from the original post break the flow and have to be manually removed.

In the case of [ quote] and [ spoiler] it does the right thing. In the case of [ ooc] it should probably just ignore all inner OOCs and close at the last, but expecting them to be balanced is reasonable.

There may be some tags that don't make sense to be nested, they can either break (as they do now) if it not possible to make sense of the nesting, or get ignored.
Can you give me a test case for this?
Quote
Feb 7, 2022 4:15 pm
Adam says:
... test case ...
As in 'example code' or as in 'where would it come up'?
Quote
Feb 7, 2022 4:19 pm
Sample code, please.

Do you mean this:

[ooc]Open ooc1[ooc]ooc2[/ooc]Close ooc1[/ooc]

Renders as:
OOC:
Open ooc1[ooc]ooc2
Close ooc1[/ooc]

(just making that we're talking about the same thing)
Quote
Feb 7, 2022 4:23 pm
OOC:
Adam says:
Sample code, please.

Do you mean this:

[ooc]Open ooc1[ooc]ooc2[/ooc]Close ooc1[/ooc]

Renders as:
[ooc]Open ooc1[ooc]ooc2
Close ooc1[/ooc]

(just making that we're talking about the same thing)
Exactly. That whole thing should be rendered as OOC. From the first open to the last close.

The situation this has been coming up in involves quoting, which copies the old text, but that should not make a difference.

[/ooc]
Quote
Feb 10, 2022 7:04 pm

Have you looked at this on staging? Public

No
Yes - I'm happy with it
Briefly - I'm happy with it
Yes - I'm NOT happy with it
Quote
Mar 4, 2022 10:54 am
Moved this back from development.

KoldikSteelskin discovered that putting too much text in a spoiler caused PHP to have an internal error when using a recursive regex.

...and we do sometimes have a lot of text in spoilers.

It's possibly linked to pcre.backtrack_limit, but I believe this would be a server side ini file change. For now, I've pulled this "fix".

You do not have permission to post in this thread.