Skip to content

Help fixing strange syntax highlighting with hocon grammar #6253

Closed Answered by Alhadis
LaurenceWarne asked this question in Q&A
Discussion options

You must be logged in to vote

I suspect this may have something to do with the malformed rule at lines 43-49:

    match: '(?:^[ \t]*([\\w-]+)\\s*?({|=|:))'
    captures:
      '1':
        'name': 'entity.name.tag.hocon'
      '2':
        'name': 'punctuation.separator.key-value.hocon'
    end: '(\\=|{)'

You've specified an end pattern without an accompanying begin pattern, and done so whilst including a match field (which is mutually exclusive to a begin/end pair). GitHub and Atom probably differ in their handling of malformed grammar rules, accounting for the discrepancy that you've witnessed.

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by LaurenceWarne
Comment options

You must be logged in to vote
1 reply
@LaurenceWarne
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants