core syntax: strip the path from filename on syntax.get (#1168)

This commit is contained in:
Jefferson González 2022-10-22 20:04:54 -04:00 committed by GitHub
parent f02b3c46e6
commit af6c4bc152
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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