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

Fix strange behavior with list close tags and empty list tags #61700

Conversation

Rindbee
Copy link
Contributor

@Rindbee Rindbee commented Jun 4, 2022

Fix the first two points in #61621.

Support for two writing ways: compact or loose. The loose one is designed for easy editing in the editor. For this, the first blank line (if exists) right after the list tags ([ol], [/ol], [ul], and [/ul]) will be ignored.

Make sure the empty list contains at least one item, that is, an empty list is ultimately a list with one item. As a reminder here is a list.

test 1

a[ol][/ol]b
a
[ol][/ol]
b
a
[ol]
[/ol]
b
a
[ol]

[/ol]
b
a
[ol]


[/ol]
b

1 2

test 2

a
[ol]text[/ol]
b
a[ol]text[/ol]b
a[ol]text
[/ol]b
a[ol]
text[/ol]b
a[ol]
text
[/ol]b
a[ol]

text
[/ol]b
a[ol]

text

[/ol]b

test 3

a
b[ol]
[ul]
text
[/ul]
[/ol]c
d
a[ol][color=red]red[/color]text[color=red]red[/color][ul][color=green]green[/color]text[color=green]green[/color][/ul][/ol]b
a
[ol]
[color=red]red[/color]text[color=red]red[/color]
[ul]
[color=green]green[/color]text[color=green]green[/color]
[/ul]
[/ol]
b
a
[ol]
[color=red]red[/color]
text
[color=red]red[/color]
[ul]
[color=green]green[/color]
text
[color=green]green[/color]
[/ul]
[/ol]
b

3

Fix the first two points in godotengine#61621.

Support for two  writing ways: compact or loose. The loose one is designed for easy editing in the editor.
For this, the first blank line (if exists) right after the list tags (`[ol]`, `[/ol]`, `[ul]`, and `[/ul]`)
will be ignored.

Make sure the empty list contains at least one item, that is, an empty list is ultimately a list with one item.
As a reminder here is a list.
@Rindbee Rindbee requested a review from a team as a code owner June 4, 2022 18:37
@KoBeWi KoBeWi added this to the 4.0 milestone Jun 4, 2022
@akien-mga akien-mga merged commit dc26b00 into godotengine:master Jun 5, 2022
@akien-mga
Copy link
Member

Thanks!

@Rindbee Rindbee deleted the fix-strange-behavior-with-list-close-tag branch June 5, 2022 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants