Skip to content

Commit bdcdc59

Browse files
authored
Add *.razor file glob to HTML [EASY MERGE] (#2115)
* Update html.rb added .razor files to html lexer * Update html_spec.rb added razor files to html spec
1 parent 43bcd4c commit bdcdc59

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/rouge/lexers/html.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class HTML < RegexLexer
77
title "HTML"
88
desc "HTML, the markup language of the web"
99
tag 'html'
10-
filenames '*.htm', '*.html', '*.xhtml', '*.cshtml'
10+
filenames '*.htm', '*.html', '*.xhtml', '*.cshtml', '*.razor'
1111
mimetypes 'text/html', 'application/xhtml+xml'
1212

1313
def self.detect?(text)

spec/lexers/html_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
assert_guess :filename => 'foo.htm'
6767
assert_guess :filename => 'foo.xhtml'
6868
assert_guess :filename => 'foo.cshtml'
69+
assert_guess :filename => 'foo.razor'
6970
end
7071

7172
it 'guesses by mimetype' do

0 commit comments

Comments
 (0)