@@ -51,6 +51,7 @@ var indent = (function (root) {
51
51
}
52
52
53
53
var NEW_LINE_REGEX = / \r * \n / ;
54
+ var HTML_TAG_RULES = [ "tag" , "void-tags" , "html-tag" ] ;
54
55
55
56
/**
56
57
* Soft dedent: this type of dedent has the opposite effect and will actually indent every line
@@ -157,9 +158,8 @@ var indent = (function (root) {
157
158
{
158
159
$languages : "js html" ,
159
160
$name : "tag" ,
160
- $excludeIf : [ "=" ] ,
161
161
$startPatterns : [ function ( string , rule , state ) {
162
- var re = / < ( [ A - Z a - z ] [ A - Z a - z 0 - 9 \- \. ] + ) / ;
162
+ var re = / < ( [ A - Z a - z ] [ A - Z a - z 0 - 9 \- \. ] * ) / ;
163
163
var match = string . match ( re ) ;
164
164
if ( match ) {
165
165
state . openingTag = match [ 1 ] ;
@@ -251,6 +251,7 @@ var indent = (function (root) {
251
251
{
252
252
$languages : "js html" ,
253
253
$name : "quotes" ,
254
+ $excludeIf : HTML_TAG_RULES ,
254
255
$startPatterns : [ / " / ] ,
255
256
$endPatterns : [ / " / , NEW_LINE_REGEX ] ,
256
257
$ignoreRules : true ,
@@ -259,6 +260,7 @@ var indent = (function (root) {
259
260
{
260
261
$languages : "js html" ,
261
262
$name : "quotes" ,
263
+ $excludeIf : HTML_TAG_RULES ,
262
264
$startPatterns : [ / ' / ] ,
263
265
$endPatterns : [ / ' / , NEW_LINE_REGEX ] ,
264
266
$ignoreRules : true ,
@@ -402,7 +404,7 @@ var indent = (function (root) {
402
404
{
403
405
$languages : "js" ,
404
406
$name : "=" ,
405
- $excludeIf : [ "tag" , "void-tags" , "html-tag" ] ,
407
+ $excludeIf : HTML_TAG_RULES ,
406
408
$startPatterns : [ / = / ] ,
407
409
$endPatterns : [ / [ , ; \) \] } ] / , NEW_LINE_REGEX ]
408
410
} ,
0 commit comments