We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37098ba commit 19c5862Copy full SHA for 19c5862
2 files changed
js/src/javascript/tokenizer.js
@@ -126,7 +126,7 @@ var Tokenizer = function(input_string, options) {
126
html_comment_end: pattern_reader.matching(/-->/),
127
include: pattern_reader.starting_with(/#include/).until_after(acorn.lineBreak),
128
shebang: pattern_reader.starting_with(/#!/).until_after(acorn.lineBreak),
129
- xml: pattern_reader.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\]|)(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/),
+ xml: pattern_reader.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),
130
single_quote: templatable.until(/['\\\n\r\u2028\u2029]/),
131
double_quote: templatable.until(/["\\\n\r\u2028\u2029]/),
132
template_text: templatable.until(/[`\\$]/),
python/jsbeautifier/javascript/tokenizer.py
@@ -119,7 +119,7 @@ def __init__(self):
119
directives_core = Directives(r"/\*", r"\*/")
120
121
xmlRegExp = re.compile(
122
- r'[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\]|)(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*(\'[^\']*\'|"[^"]*"|{[\s\S]+?}))*\s*(/?)\s*>'
+ r'[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*(\'[^\']*\'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>'
123
)
124
125
0 commit comments