js-yaml icon indicating copy to clipboard operation
js-yaml copied to clipboard

fix: tag-handle may include digits in directive

Open mighty1231 opened this issue 1 year ago • 0 comments

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

mighty1231 avatar Jan 22 '24 02:01 mighty1231