mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-13 05:53:50 -05:00
Tweak detect_filetypes regex so 'setf cpp|endif' works right
This commit is contained in:
@@ -815,7 +815,7 @@ end
|
|||||||
|
|
||||||
def detect_filetypes_str(contents)
|
def detect_filetypes_str(contents)
|
||||||
contents = contents.gsub(/^\s*au(tocmd)?!?\s*$/, '')
|
contents = contents.gsub(/^\s*au(tocmd)?!?\s*$/, '')
|
||||||
results = contents.scan(/^\s*(?:au!|au|au[^g][^ ]*) +(?:\S+)\s+(\S+)[\s\\]+([^\n]+)/)
|
results = contents.scan(/^\s*(?:au!|au|au[^g][^ ]*) +(?:\S+)\s+(\S+)[\s\\]+([^\n|]+)/)
|
||||||
results = results.map do |a, b|
|
results = results.map do |a, b|
|
||||||
[
|
[
|
||||||
a,
|
a,
|
||||||
|
|||||||
Reference in New Issue
Block a user