Skip to content

Commit 15b75a6

Browse files
File name matches and mime matches should be moved to phtml from php lexer (#477)
1 parent d4eca2a commit 15b75a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: lexers/circular/phtml.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ var PHTML = internal.Register(DelegatingLexer(h.HTML, MustNewLazyLexer(
1313
&Config{
1414
Name: "PHTML",
1515
Aliases: []string{"phtml"},
16-
Filenames: []string{"*.phtml"},
17-
MimeTypes: []string{"application/x-php", "application/x-httpd-php", "application/x-httpd-php3", "application/x-httpd-php4", "application/x-httpd-php5"},
16+
Filenames: []string{"*.phtml", "*.php", "*.php[345]", "*.inc"},
17+
MimeTypes: []string{"application/x-php", "application/x-httpd-php", "application/x-httpd-php3", "application/x-httpd-php4", "application/x-httpd-php5", "text/x-php"},
1818
DotAll: true,
1919
CaseInsensitive: true,
2020
EnsureNL: true,
21+
Priority: 2,
2122
},
2223
phtmlRules,
2324
).SetAnalyser(func(text string) float32 {

0 commit comments

Comments
 (0)