File tree 2 files changed +35
-1
lines changed
2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1
1
const { parse } = require ( '@test/test-target' ) ;
2
2
3
- describe . only ( 'issue 267' , function ( ) {
3
+ describe ( 'issue 267' , function ( ) {
4
4
it ( 'Incorrect Handling of Empty Class Attributes in SVG Parsing' , function ( ) {
5
5
const html = `<polygon points="-235.18 1571.95 1014.73 1284.4 1083.46 1590.1 -166.45 1877.65 -235.18 1571.95" fill="#ff8200" class="" design-color="primary"></polygon> ` ;
6
6
const root = parse ( html ) ;
Original file line number Diff line number Diff line change
1
+ const { parse } = require ( '@test/test-target' ) ;
2
+
3
+ describe . skip ( 'issue 268' , function ( ) {
4
+ it ( 'Wrong output on malformed HTML' , function ( ) {
5
+ const html = `
6
+ <table id="mytable">
7
+ <tr class="myrow">
8
+ <td>1</td>
9
+ <td><a href="#" 2'>x</a></td>
10
+ <td>2</td>
11
+ </tr>
12
+ <tr class="myrow">
13
+ <td>3</td>
14
+ <td><a href="#" 2'>x</a></td>
15
+ <td>4</td>
16
+ </tr>
17
+ </table>` ;
18
+ const root = parse ( html ) ;
19
+ root . querySelectorAll ( "#mytable tr.myrow" ) . length . should . eql ( 2 ) ;
20
+ // for (let tr of root.querySelectorAll("#mytable tr.myrow")) {
21
+ // console.log('xxx',tr.querySelectorAll(":scope > td").map(e => e.innerText));
22
+ // }
23
+ } ) ;
24
+ it ( 'xxx' , function ( ) {
25
+ const html = `<a href="#" 2'>x</a><a href="#" 2'>x</a>` ;
26
+ const root = parse ( html ) ;
27
+ const a = root . querySelector ( "a" ) ;
28
+ console . error ( 'sss' , a . attributes ) ;
29
+ a . toString ( ) . should . eql ( '<a href="#" 2">x</a>' ) ;
30
+ // for (let tr of root.querySelectorAll("#mytable tr.myrow")) {
31
+ // console.log('xxx',tr.querySelectorAll(":scope > td").map(e => e.innerText));
32
+ // }
33
+ } ) ;
34
+ } ) ;
You can’t perform that action at this time.
0 commit comments