Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BBcode doesn't work well if the markers are closed in reverse order #23983

Closed
Tracked by #39144
qarmin opened this issue Nov 26, 2018 · 5 comments
Closed
Tracked by #39144

BBcode doesn't work well if the markers are closed in reverse order #23983

qarmin opened this issue Nov 26, 2018 · 5 comments

Comments

@qarmin
Copy link
Contributor

qarmin commented Nov 26, 2018

Godot version:
3.1 9e62826

OS/device including version:
Windows 10

Issue description:
When my BBcode in RichTextLabel is like below, everything works as I expect:
asfasasfasf

[center][color=green]Ziemniakq[/color][/center]

but when I change text to this, then strange text after my text appear

aaaaaaaa

[center][color=green]Ziemniakq[/center][/color]

Minimal reproduction project:
Test.zip

@slapin
Copy link
Contributor

slapin commented Nov 26, 2018

But why do you close tags out of order?

@Zireael07
Copy link
Contributor

BBcode on forums doesn't care about order, and it's an easy enough mistake to make.

@slapin
Copy link
Contributor

slapin commented Nov 26, 2018

Well, forums run on servers with many gigabytes of RAM and many GHz CPUs, and general developers are much more disciplined. I doubt making fuzzy parser for bbcode worth the gain at all. Just my personal opinion.

@tom-jk
Copy link

tom-jk commented Jul 28, 2020

State of this issue: since 3.2, the MRP with reversed close tags produces "Ziemnikq[/center]", which is a fair improvement on 3.1.

@akien-mga
Copy link
Member

Yes that seems correct to me, unless we aim to explicitly support closing tags in random order, but I don't think it's necessary.

@akien-mga akien-mga added this to the 3.2 milestone Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants