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

Key may be quoted #759

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

Key may be quoted #759

wants to merge 1 commit into from

Conversation

towo
Copy link

@towo towo commented Apr 21, 2022

The lens assumed an unquoted word-like key, while it may be unquoted.

Technically, according to the
spec,
it even allows for a few more non-word chars.

Test not adjusted (yet) because the format confused me.

The lens assumed an unquoted word-like key, while it may be unquoted.

Technically, according to the
[spec](https://github.com/toml-lang/toml/blob/cbf3b13128fb717517afbd22f8fcb665a0b0b035/toml.abnf#L73),
it even allows for a few more non-word chars.
@towo towo marked this pull request as draft April 21, 2022 14:13
@towo towo marked this pull request as ready for review April 21, 2022 14:23
@towo
Copy link
Author

towo commented Apr 21, 2022

Weirdly enough, augmatch is also giving the output keys unquoted whilst augtool is giving the output keys quoted, which affects matching. This also applies to the current master version, so no changes from my side.

@georgehansper
Copy link
Member

This change fails testing with the message:

Syntax error in lens definition
/home/george/github/augeas/lenses/toml.aug:125.0-126.88:Failed to compile entry
/home/george/github/augeas/lenses/toml.aug:125.44-.70:exception: overlapping lenses in tree union.put
    Example matched by both: 
    First lens: /home/george/github/augeas/lenses/toml.aug:122.17-.60:
    Second lens: /home/george/github/augeas/lenses/toml.aug:123.19-.32:

I would also suggest that, if the Toml lens is to support quoted keys, too, then this should be included in a test-case.

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

2 participants