Skip to content

Commit

Permalink
Update modeline pattern to use github-linguist/linguist#5271
Browse files Browse the repository at this point in the history
  • Loading branch information
Alhadis committed Mar 13, 2021
1 parent 637900f commit b429372
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ This project adheres to [Semantic Versioning](http://semver.org).
[Staged]
------------------------------------------------------------------------
* __Fixed:__ Conditional requests not highlighting the commands they run
* __Fixed:__ Parameter highlighting terminated at the letter `R` in Atom
* __Fixed:__ Parameter highlighting terminated at the letter `R` in Atom
* __Fixed:__ Various [inaccuracies][1] related to Roff modeline matching

[1]: https://github.com/github/linguist/pull/5271


[v1.3.1]
Expand Down
18 changes: 9 additions & 9 deletions grammars/roff.cson
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,20 @@ firstLineMatch: """(?x)
|
# Modeline
(?i:
(?:
# Emacs
-\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)
[gnt]?roff
(?=[\\s;]|(?<![-*])-\\*-).*?-\\*-
-\\*-(?i:[ \\t]*(?=[^:;\\s]+[ \\t]*-\\*-)|(?:.*?[ \\t;]|(?<=-\\*-))[ \\t]*mode[ \\t]*:[ \\t]*)
(?i:[gnt]?roff)
(?=[ \\t;]|(?<![-*])-\\*-).*?-\\*-
|
# Vim
(?:(?:\\s|^)vi(?:m[<=>]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s* set?\\s))
(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:]
(?:filetype|ft|syntax)\\s*=
[gnt]?roff
(?=\\s|:|$)
(?:(?:^|[ \\t])(?:vi|Vi(?=m))(?:m[<=>]?[0-9]+|m)?|[ \\t]ex)(?=:(?=[ \\t]*set?[ \\t][^\\r\\n:]+:)|:(?![ \\t]*set?[ \\t]))
(?:(?:[ \\t]*:[ \\t]*|[ \\t])\\w*(?:[ \\t]*=(?:[^\\\\\\s]|\\\\.)*)?)*[ \\t:]
(?:filetype|ft|syntax)[ \\t]*=
(?i:[gnt]?roff)
(?=$|\\s|:)
)
"""
limitLineLength: no
Expand Down

0 comments on commit b429372

Please sign in to comment.