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: do not allow element in x:label element #820

Merged
merged 6 commits into from
Mar 13, 2020

Conversation

AirQuick
Copy link
Member

@AirQuick AirQuick commented Mar 9, 2020

Fixes #801

This pull request changes the schema of x:label to disallow child elements.

Also,

  • mode="x:gather-specs" is updated to always preserve whitespace-only text nodes in x:label.
  • Some tests are added for x:is-user-content(), which ensures that x:label//node() is not handled in the same way as nodes under x:param, x:context etc.

@AirQuick AirQuick added the bug label Mar 9, 2020
@AirQuick AirQuick added this to the v1.6.0 milestone Mar 9, 2020
@commit-lint
Copy link

commit-lint bot commented Mar 9, 2020

Bug Fixes

  • do not allow element in x:label element (2688e86)
  • preserve whitespace-only text nodes in x:label (c05b06d)

Tests

  • add test for x:label (909fe89)
  • test x:is-user-content() with x:label (67aeee9)
  • change comment and processing instruction in x:like/x:label (5aa75fc)

Contributors

@AirQuick

Copy link
Member

@galtm galtm left a comment

Choose a reason for hiding this comment

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

Looks great. I have one comment, and you can decide if it's tangential or relevant.

test/end-to-end/cases/label-element.xspec Outdated Show resolved Hide resolved
@AirQuick AirQuick merged commit 3fdb0fe into xspec:master Mar 13, 2020
@AirQuick AirQuick deleted the no-element-in-label branch March 13, 2020 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

x:label element accepts non-text nodes
2 participants