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

negative numbers as properties should not parse as a list #11

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

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 <[email protected]>
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 <[email protected]>
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