File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -687,7 +687,7 @@ export default class HTMLElement extends Node {
687
687
}
688
688
const attrs = { } as RawAttributes ;
689
689
if ( this . rawAttrs ) {
690
- const re = / ( [ a - z A - Z ( ) [ \] # ] [ a - z A - Z 0 - 9 - _ : ( ) [ \] # ] * ) (?: \s * = \s * ( (?: ' [ ^ ' ] * ' ) | (?: " [ ^ " ] * " ) | \S + ) ) ? / g;
690
+ const re = / ( [ a - z A - Z ( ) [ \] # @ ] [ a - z A - Z 0 - 9 - _ : ( ) [ \] # ] * ) (?: \s * = \s * ( (?: ' [ ^ ' ] * ' ) | (?: " [ ^ " ] * " ) | \S + ) ) ? / g;
691
691
let match : RegExpExecArray ;
692
692
while ( ( match = re . exec ( this . rawAttrs ) ) ) {
693
693
const key = match [ 1 ] ;
Original file line number Diff line number Diff line change @@ -214,11 +214,12 @@ describe('HTML Parser', function () {
214
214
215
215
describe ( '#rawAttributes' , function ( ) {
216
216
it ( 'should return escaped attributes of the element' , function ( ) {
217
- const root = parseHTML ( '<p a=12 data-id="!$$&" yAz=\'1\'></p>' ) ;
217
+ const root = parseHTML ( '<p a=12 data-id="!$$&" yAz=\'1\' @click="doSmt()" ></p>' ) ;
218
218
root . firstChild . rawAttributes . should . eql ( {
219
219
'a' : '12' ,
220
220
'data-id' : '!$$&' ,
221
- 'yAz' : '1'
221
+ 'yAz' : '1' ,
222
+ '@click' : 'doSmt()'
222
223
} ) ;
223
224
} ) ;
224
225
} ) ;
You can’t perform that action at this time.
0 commit comments