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

text-minimessage: Allow tags to be closed in one tag #707

Merged
merged 2 commits into from Feb 27, 2022

Conversation

zml2008
Copy link
Member

@zml2008 zml2008 commented Feb 26, 2022

This simplifies the language for tags with no children.

@zml2008 zml2008 added this to the 4.10.0 milestone Feb 26, 2022
Base automatically changed from feature/serializer to main/4 February 26, 2022 17:52
@zml2008 zml2008 marked this pull request as ready for review February 26, 2022 17:52
@rymiel
Copy link
Member

rymiel commented Feb 26, 2022

This doesn't implement #523, just adds the tokenization capabilities, right?
Is emitting lang and key tags as self-closing something we want? Maybe makes it imply those have children taking #523 into context

@rymiel
Copy link
Member

rymiel commented Feb 26, 2022

disregard the first part of that comment, testIgnorableSelfClosable addresses that

This simplifies the language for cases where certain tags have zero
children.

Fixes GH-704
Fixes GH-523
@zml2008
Copy link
Member Author

zml2008 commented Feb 27, 2022

To support vanilla components properly, I made all of the standard tags able to have children, since all component types can have children normally. The forced-no children attribute on Inserting tags is really just for custom things -- so there should probably be an attribute on the serializer to generate those sort of tags without the closing slash.

The only situation where that's relevant in MM itself is probably the newline tag though, since that's theoretically serializable (though, due to compaction it often won't end up as a separate component).

Copy link
Member

@rymiel rymiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Today i learned those components can have children in vanilla, sounds messy

This was referenced Feb 28, 2022
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.

Support self-closing tags in the parser Add a way to prevent templates impacting remaining content
3 participants