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

Extend delimiters for tag values #61

Merged
merged 2 commits into from Nov 26, 2019

Conversation

@xiam
Copy link
Member

xiam commented Nov 13, 2019

I think tab could work to delimit, but that is pretty much it, as some people might want space or other characters in their value, prob not tab or newline tho

@pkieltyka accepting spaces and handling cases like:

+ tag = this a tag value with # spaces # and hash# sign # and this is a comment

would be problematic from the parser's point of view (because identifying a comment would depend on the context and we'll have to ask things like is this the last # preceded by [whitespace] on this line?)

What we can do to solve this problem is to look for [whitespace] or [newline] to mark the end of a token, and also add support for quoted values that may include [whitespace]. See below:

+ json = field_2 # a comment
+ go.tag.db = field_2 # a comment
+ go.tag.db.1 = default**:**now**()**,use_zero#000 # # # a comment with two hashes
+ go.tag.db.2 = default**:**now**()**,use_zero,"// # a comment
+ go.tag.db.3 = "default**:**now**()**,use_zero,// # this is not a comment" # this is a comment
+ go.tag.db.4 = default**:**now**()**,use_zero

What do you think?

Closes #60

@xiam xiam requested a review from pkieltyka Nov 13, 2019
@xiam xiam force-pushed the issue-60_richer_tag_values branch from 2533dba to c6a3b26 Nov 19, 2019
@xiam

This comment has been minimized.

Copy link
Member Author

xiam commented Nov 19, 2019

Rebased and passing tests.

@pkieltyka pkieltyka merged commit 0f1aaf2 into master Nov 26, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@pkieltyka pkieltyka deleted the issue-60_richer_tag_values branch Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.