Skip to content

Compatibility with github-linguist #3

@DecimalTurn

Description

@DecimalTurn

As you know, there are currently multiple issues with Atom's YAML syntax highlighting grammar. For that reason, I was looking to see if there was a better alternative to use for github-linguist and found this repo which seems to be of high quality and would be a great improvement for YAML's syntax highlighting on GitHub.

However, for the grammar in this repo to be used with Linguist, it would have to pass a certain number of checks and based on the early tests I've done, there would be some adjustments to be made to the tmLanguage.json files for it to be used by github-linguist (see Linguist's Error Report below).

Obviously, you have no obligation to make any adjustments if having your grammar used by Linguist is not something you'd be interested in. However, if you are interested, let me know and I might also be able to help make the needed changes, which hopefully won't have any major impact on the behavior of the grammar.

Linguist's Error Report

(Note from me: some \t were replaced by spaces when generating the ouput)

37 errors found in new grammar 'repository vendor/grammars/YAML-Syntax-Highlighter (from https://github.com/RedCMD/YAML-Syntax-Highlighter.git)':

yaml-1.1.tmLanguage.json

  • Grammar conversion failed. File syntaxes/yaml-1.1.tmLanguage.json failed to parse: 1 error(s) decoding:
  • 'Repository[directives].Patterns[4].Patterns[0].BeginCaptures[comment]' expected a map, got 'string'

yaml-1.2.tmLanguage.json

  • Grammar conversion failed. File syntaxes/yaml-1.2.tmLanguage.json failed to parse: 1 error(s) decoding:
  • 'Repository[directives].Patterns[4].Patterns[0].BeginCaptures[comment]' expected a map, got 'string'

yaml-embedded.tmLanguage.json

  • Grammar conversion failed. File syntaxes/yaml-embedded.tmLanguage.json failed to parse: 1 error(s) decoding:
  • 'Repository[directives].Patterns[1].BeginCaptures[comment]' expected a map, got 'string'

yaml-1.0.tmLanguage.json

  • Invali ,[]{...": non-hex character in \x{} (closing brace missing?) (at offset 11))ontains a malformed regex (regex "?(?=[\x{85 2028 2029}
  • Invalid regex in grammar: source.yaml.1.0 (in syntaxes/yaml-1.0.tmLanguage.json) contains a malformed regex (regex "(?<=[\t ,\[{]|^)(?=(?>[^-?:,\[\]{...": unknown property name after \P or \p (at offset 53))
  • Invali ])": non-hex character in \x{} (closing brace missing?) (at offset 12))son) contains a malformed regex (regex "`---(?=[\x{85 2028 2029}
  • Invalid regex in grammar: source.yaml.1.0 (in syntaxes/yaml-1.0.tmLanguage.json) contains a malformed regex (regex "\G(?!(?>\.{3}|---)[\x{85 2028 20...": non-hex character in \x{} (closing brace missing?) (at offset 24))
  • Invali ])": non-hex character in \x{} (closing brace missing?) (at offset 14))son) contains a malformed regex (regex "`(?=.{3}[\x{85 2028 2029}
  • Invalid regex in grammar: source.yaml.1.0 (in syntaxes/yaml-1.0.tmLanguage.json) contains a malformed regex (regex "\G(?!(?>\.{3}|---)[\x{85 2028 20...": non-hex character in \x{} (closing brace missing?) (at offset 24))
  • Invali ]...": non-hex character in \x{} (closing brace missing?) (at offset 16))n) contains a malformed regex (regex "`\G(?!%|---[\x{85 2028 2029}
  • Invalid regex in grammar: source.yaml.1.0 (in syntaxes/yaml-1.0.tmLanguage.json) contains a malformed regex (regex "(%)([^: \p{Cntrl}\p{Surrogate}\x...": unknown property name after \P or \p (at offset 16))
  • Invalid regex in grammar: source.yaml.1.0 (in syntaxes/yaml-1.0.tmLanguage.json) contains a malformed regex (regex "\G(:)([^ \p{Cntrl}\p{Surrogate}\...": unknown property name after \P or \p (at offset 17))
  • Invali ]...": non-hex character in \x{} (closing brace missing?) (at offset 16))n) contains a malformed regex (regex "`\G.{3}(?=[\x{85 2028 2029}
  • Invali -\x{10FFFF...": non-hex character in \x{} (closing brace missing?) (at offset 7))ains a malformed regex (regex "[^\x{85 2028 2029}
  • Invali ,[]{...": non-hex character in \x{} (closing brace missing?) (at offset 11))ontains a malformed regex (regex "?(?=[\x{85 2028 2029}
  • Invalid regex in grammar: source.yaml.1.0 (in syntaxes/yaml-1.0.tmLanguage.json) contains a malformed regex (regex "(?=(?>[^-?:,\[\]{}#&*!|>'"%@ \p`...": unknown property name after \P or \p (at offset 38))
  • Invalid regex in grammar: source.yaml.1.0 (in syntaxes/yaml-1.0.tmLanguage.json) contains a malformed regex (regex "(?=%YAML:1\.0(?=[\x{85 2028 2029...": non-hex character in \x{} (closing brace missing?) (at offset 22))
  • Invali ])": non-hex character in \x{} (closing brace missing?) (at offset 14))son) contains a malformed regex (regex "`\G(?!---[\x{85 2028 2029}
  • Invali ])": non-hex character in \x{} (closing brace missing?) (at offset 14))son) contains a malformed regex (regex "`\G(?=---[\x{85 2028 2029}
  • Invalid regex in grammar: source.yaml.1.0 (in syntaxes/yaml-1.0.tmLanguage.json) contains a malformed regex (regex "(?=((?<=[-?:]) )?+)(?<![^ ][ ]...": non-hex character in \x{} (closing brace missing?) (at offset 71))
  • Invalid regex in grammar: source.yaml.1.0 (in syntaxes/yaml-1.0.tmLanguage.json) contains a malformed regex (regex "(?<=(?>["'\]}]|^)[ ]*+):": lookbehind assertion is not fixed length (at offset 23))
  • Invalid regex in grammar: source.yaml.1.0 (in syntaxes/yaml-1.0.tmLanguage.json) contains a malformed regex (regex "(?=((?<=[-?:]) )?+)\G( *+)(\?)(?...": non-hex character in \x{} (closing brace missing?) (at offset 39))
  • Invali ])": non-hex character in \x{} (closing brace missing?) (at offset 11))son) contains a malformed regex (regex "`(?=[\x{2028 2029}
  • Invali ])": non-hex character in \x{} (closing brace missing?) (at offset 12))son) contains a malformed regex (regex "`\G!(?=[\x{85 2028 2029}
  • Invali ]{2,0}": non-hex character in \x{} (closing brace missing?) (at offset 8))) contains a malformed regex (regex "`%[^\x{85 2028 2029}
  • Invalid regex in grammar: source.yaml.1.0 (in syntaxes/yaml-1.0.tmLanguage.json) contains a malformed regex (regex "(?=((?<=[-?:]) )?+)(?<![^ ][ ]...": non-hex character in \x{} (closing brace missing?) (at offset 59))
  • Invali ,[]{}...": non-hex character in \x{} (closing brace missing?) (at offset 10))ntains a malformed regex (regex ":(?=[\x{85 2028 2029}
    0abtnvfre "...": non-hex character in \x{} (closing brace missing?) (at offset 8))n) contains a malformed regex (regex "`\[\x{85 2028 2029}
  • Invalid regex in grammar: source.yaml.1.0 (in syntaxes/yaml-1.0.tmLanguage.json) contains a malformed regex (regex "\\(?>x[^"]{2,0}|u[^"]{4,0}|U[^"]...": numbers out of order in {} quantifier (at offset 14))
  • Invalid regex in grammar: source.yaml.1.0 (in syntaxes/yaml-1.0.tmLanguage.json) contains a malformed regex (regex "(?<=\[)\G(?=[\x{85 2028 2029} ...": non-hex character in \x{} (closing brace missing?) (at offset 18))
  • Invali ,#])": non-hex character in \x{} (closing brace missing?) (at offset 10))n) contains a malformed regex (regex "`(?=[^\x{85 2028 2029}
  • Invali ...": non-hex character in \x{} (closing brace missing?) (at offset 17))on) contains a malformed regex (regex "`(?<={)\G(?=[\x{85 2028 2029}
  • Invali ,#])": non-hex character in \x{} (closing brace missing?) (at offset 10))n) contains a malformed regex (regex "`(?=[^\x{85 2028 2029}
  • Invali ])|(?<=...": non-hex character in \x{} (closing brace missing?) (at offset 10))ntains a malformed regex (regex ":(?=[\x{85 2028 2029}
  • Invalid regex in grammar: source.yaml.1.0 (in syntaxes/yaml-1.0.tmLanguage.json) contains a malformed regex (regex "\G(?![?:!"'0-9A-Za-z$()+./;<=\\^...": non-hex character in \x{} (closing brace missing?) (at offset 101))

yaml.tmLanguage.json

  • Invalid regex in grammar: source.yaml (in syntaxes/yaml.tmLanguage.json) contains a malformed regex (regex "(?<=^-{3,}\s*+)\G$": lookbehind assertion is not fixed length (at offset 14))
  • Invalid regex in grammar: source.yaml (in syntaxes/yaml.tmLanguage.json) contains a malformed regex (regex "^(?! {3,0}-{3,}[ \t]*+$|[ ]*+\.{...": numbers out of order in {} quantifier (at offset 9))

Compilation failed. Aborting

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions