Skip to content

Commit

Permalink
Update modeline patterns 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 5de0449 commit 15512d9
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions grammars/texinfo.cson
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,20 @@ firstLineMatch: """(?x)
^\\s*\\\\input\\s+texinfo\\s*$
|
# Modeline
(?i:
(?:
# Emacs
-\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)
texinfo
(?=[\\s;]|(?<![-*])-\\*-).*?-\\*-
-\\*-(?i:[ \\t]*(?=[^:;\\s]+[ \\t]*-\\*-)|(?:.*?[ \\t;]|(?<=-\\*-))[ \\t]*mode[ \\t]*:[ \\t]*)
(?i:texinfo)
(?=[ \\t;]|(?<![-*])-\\*-).*?-\\*-
|
# Vim
(?:(?:\\s|^)vi(?:m[<=>]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\r\\n:]+:)|:(?!\\s* set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\r\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=
texinfo
(?=\\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:texinfo)
(?=$|\\s|:)
)
"""
injectionSelector: "emacs.lisp"
Expand Down

0 comments on commit 15512d9

Please sign in to comment.