Expose plaintext syntax (#1652)
This commit is contained in:
parent
a29327e375
commit
39993a6d93
|
@ -3,7 +3,7 @@ local common = require "core.common"
|
|||
local syntax = {}
|
||||
syntax.items = {}
|
||||
|
||||
local plain_text_syntax = { name = "Plain Text", patterns = {}, symbols = {} }
|
||||
syntax.plain_text_syntax = { name = "Plain Text", patterns = {}, symbols = {} }
|
||||
|
||||
|
||||
function syntax.add(t)
|
||||
|
@ -46,7 +46,7 @@ end
|
|||
function syntax.get(filename, header)
|
||||
return (filename and find(filename, "files"))
|
||||
or (header and find(header, "headers"))
|
||||
or plain_text_syntax
|
||||
or syntax.plain_text_syntax
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue