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: tag-handle may include digits in directive #716

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mighty1231
Copy link

@mighty1231 mighty1231 commented Jan 22, 2024

What does it fix?

normal tag directive - %TAG !taghandle! tag:yaml.org,2002:

test case %TAG !12345! tag:yaml.org,2002:

  • currently js-yaml throw error during parsing tag directive
  • expected it should not throw error

reference: c-tag-handle

  • "c-tag-handle" may be "c-named-tag-handle"
  • c-named-tag-handle ::= "!" ns-word-char + "!"
  • ns-word-char defined as one of ns-dec-digit, ns-ascii-letter or "-"
  • and finally ns-dec-digit is [0-9]

My references is from yaml 1.1, but these things have not been changed in yaml 1.2 spec

"c-tag-handle" defined in https://yaml.org/spec/1.1/#c-tag-handle
may be "c-named-tag-handle"
and c-named-tag-handle ::= "!" ns-word-char + "!"

"ns-word-char" defined in https://yaml.org/spec/1.1/#ns-word-char
indicates that it is one of ns-dec-digit, ns-ascii-letter or "-"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant