Default global syntax.filemap sets default filetypes to JavaScript for JSON configurations
Closed, ResolvedPublic


Minor detail.

This array seems to set default file types for the syntax highlighter for special Phabricator/Arcanist configurations. js is the name for JavaScript, it seems. It should be set to json, as far as I understand.

cinek created this task.Sep 20 2016, 7:31 AM
epriestley added a subscriber: epriestley.

To fix this:

  • Change these to json.

To test:

  • Create a new Paste called .arcconfig without an explicit highlighting language (e.g., autodetect).
  • Verify that the content is highlighted as JSON, not Javascript.
    • I have no idea what the difference is or what to look for, perhaps @cinek has an example of a file that gets highlighted differently.
    • Otherwise, create test.js an test.json and fiddle with them until they highlight differently.
    • Or you could var_dump() the language in use and just inspect it, but it's probably tricky to get at.

See also T12532 for related work.

amckinley closed this task as Resolved.Apr 13 2017, 8:57 PM