File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -176,14 +176,13 @@ function hljsDefineCshtmlRazor(hljs) {
176
176
} ;
177
177
var xml_blocks = getXmlBlocks ( hljs , [ razor_inline_expresion , razor_parentheses_block ] ) ;
178
178
var razor_directives = {
179
- begin : "^@(model|using|inherits|inject)[^\\r\\n{\\(]*$" ,
180
- end : "$" ,
181
- className : SPECIAL_SYMBOL_CLASSNAME ,
179
+ begin : "^\\s*@(model|using|inherits|inject)[^\\r\\n{\\(]*$" ,
180
+ end : "$" ,
182
181
returnBegin : true ,
183
182
returnEnd : true ,
184
183
contains : [
185
184
{
186
- begin : "@(model|using|inherits|inject)" ,
185
+ begin : "^\\s* @(model|using|inherits|inject)" ,
187
186
className : SPECIAL_SYMBOL_CLASSNAME
188
187
} ,
189
188
{
@@ -201,12 +200,13 @@ function hljsDefineCshtmlRazor(hljs) {
201
200
returnBegin : true ,
202
201
returnEnd : true ,
203
202
end : "\\}" ,
204
- subLanguage : [ 'cshtml-razor ' , 'cs ' ] ,
203
+ subLanguage : [ 'cs ' , 'cshtml-razor ' ] ,
205
204
contains : [
206
205
{
207
206
begin : "@\\{" ,
208
207
className : SPECIAL_SYMBOL_CLASSNAME
209
208
} ,
209
+ razor_text_block ,
210
210
braces ,
211
211
closed_brace
212
212
]
@@ -346,6 +346,7 @@ function hljsDefineCshtmlRazor(hljs) {
346
346
razor_try_block ,
347
347
razor_escape_at ,
348
348
razor_text_block ,
349
+ razor_parentheses_block ,
349
350
{
350
351
className : 'meta' ,
351
352
begin : '<!DOCTYPE' , end : '>' ,
You can’t perform that action at this time.
0 commit comments