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

ABNF - rule allowing literal DQUOTE breaks highlighting #2

Closed
jchook opened this issue Dec 2, 2019 · 3 comments
Closed

ABNF - rule allowing literal DQUOTE breaks highlighting #2

jchook opened this issue Dec 2, 2019 · 3 comments

Comments

@jchook
Copy link

jchook commented Dec 2, 2019

How do I specify a production rule allowing a literal DQUOTE?

For example, check out RFC 2045. They appear to use prose-val to specify a literal double quote <">, but it would seem that char-val otherwise allows """. Both options cause a "run-on" quoted string in the syntax highlighting (see screenshot).

The formal ABNF specification specifies:

char-val       =  DQUOTE *(%x20-21 / %x23-7E) DQUOTE
prose-val      =  "<" *(%x20-3D / %x3F-7E) ">"

Also, thanks a lot for making this!

image

@jchook jchook changed the title ABNF - production allowing double quote character breaks highlighting ABNF - rule allowing literal DQUOTE breaks highlighting Dec 2, 2019
@Alhadis Alhadis closed this as completed in 422d721 Dec 3, 2019
@Alhadis
Copy link
Owner

Alhadis commented Dec 3, 2019

Weird that I completely missed prose-val while going through RFC 5234. 🤔 I've amended this in 422d721; thanks for bringing it to my attention.

but it would seem that char-val otherwise allows """

Where did you read that? The formal definition of char-val explicitly excludes DQUOTE (U+0022) from its permitted character range:

char-val       =  DQUOTE *(%x20-21 / %x23-7E) DQUOTE
                    ; quoted string of SP and VCHAR
                    ;  without DQUOTE

@jchook
Copy link
Author

jchook commented Dec 3, 2019

I've amended this in 422d721; thanks for bringing it to my attention.

Thank you! :)

The formal definition of char-val explicitly excludes DQUOTE.

Yep, good point. I misread the definition. Thanks again!

@Alhadis
Copy link
Owner

Alhadis commented Dec 4, 2019

Glad to help! I've just cut a release, so the recent fixes should be available to you immediately.

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

No branches or pull requests

2 participants