Skip to content

Commit

Permalink
Fix for #12977
Browse files Browse the repository at this point in the history
  • Loading branch information
egamma committed Sep 29, 2016
1 parent 26135c9 commit cc3e8bb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions extensions/html/client/src/htmlMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,19 @@ export function activate(context: ExtensionContext) {
}
],
});

languages.setLanguageConfiguration('razor', {
wordPattern: /("(?:[^\\\"]*(?:\\.)?)*"?)|('(?:[^\\\']*(?:\\.)?)*'?)|[^\s<>={}\[\],]+/,
onEnterRules:[
{
beforeText: new RegExp(`<(?!(?:${EMPTY_ELEMENTS.join('|')}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`, 'i'),
afterText: /^<\/([_:\w][_:\w-.\d]*)\s*>$/i,
action: { indentAction: IndentAction.IndentOutdent }
},
{
beforeText: new RegExp(`<(?!(?:${EMPTY_ELEMENTS.join('|')}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`, 'i'),
action: { indentAction: IndentAction.Indent }
}
],
});
}

0 comments on commit cc3e8bb

Please sign in to comment.