Skip to content

Commit

Permalink
core syntax: strip the path from filename on syntax.get (lite-xl#1168)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgmdev authored Oct 23, 2022
1 parent f02b3c4 commit af6c4bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/core/syntax.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ local function find(string, field)
end

function syntax.get(filename, header)
return find(filename, "files")
return find(common.basename(filename), "files")
or (header and find(header, "headers"))
or plain_text_syntax
end
Expand Down

0 comments on commit af6c4bc

Please sign in to comment.