Skip to content

Conversation

@FreeMasen
Copy link

Negative numbers as properties are currently being tokenized into two parts, the - and the string and since the - isn't white space aware, it causes these values to end up as a list.

This change adds a new case for string that will consider any - not followed by a space. I had initially tried only capture the -%d case but that lead to errors in the list-nested test. If desired I can keep working on restricting this further to valid numbers.

Riflio pushed a commit to Riflio/lua-yaml that referenced this pull request Jan 30, 2023
feat(yaml.lua): Add support check YAML version tag
feat(yaml.lua): dump to yaml (author @snowyu, PR exosite#12)
fix(yaml.lua): negative numbers as properties should not parse as a list (author @FreeMasen, PR exosite#11)
fix(yaml.lua): timestamp timezone
fix(yaml.lua): only parsing first block hash with indent==0
fix(yaml.lua): parsing block after empty row
feat(samples): Check comments
fix(samples): timezone
feat(samples): Check negative numbers as properties
snowyu pushed a commit to snowyu/lua-yaml that referenced this pull request Feb 2, 2023
feat(yaml.lua): Add support check YAML version tag
feat(yaml.lua): dump to yaml (author @snowyu, PR exosite#12)
fix(yaml.lua): negative numbers as properties should not parse as a list (author @FreeMasen, PR exosite#11)
fix(yaml.lua): timestamp timezone
fix(yaml.lua): only parsing first block hash with indent==0
fix(yaml.lua): parsing block after empty row
feat(samples): Check comments
fix(samples): timezone
feat(samples): Check negative numbers as properties
tionis pushed a commit to tionis/lua-yaml that referenced this pull request Dec 1, 2023
…k YAML version tag feat(yaml.lua): dump to yaml (author @snowyu, PR exosite#12) fix(yaml.lua): negative numbers as properties should not parse as a list (author @FreeMasen, PR exosite#11) fix(yaml.lua): timestamp timezone fix(yaml.lua): only parsing first block hash with indent==0 fix(yaml.lua): parsing block after empty row feat(samples): Check comments fix(samples): timezone feat(samples): Check negative numbers as properties

Signed-off-by: tionis <git@tionis.dev>
tionis pushed a commit to tionis/lua-yaml that referenced this pull request Dec 1, 2023
…k YAML version tag feat(yaml.lua): dump to yaml (author @snowyu, PR exosite#12) fix(yaml.lua): negative numbers as properties should not parse as a list (author @FreeMasen, PR exosite#11) fix(yaml.lua): timestamp timezone fix(yaml.lua): only parsing first block hash with indent==0 fix(yaml.lua): parsing block after empty row feat(samples): Check comments fix(samples): timezone feat(samples): Check negative numbers as properties

Signed-off-by: tionis <git@tionis.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant