Skip to content

Commit bd672af

Browse files
committed
Fix SVG handling
1 parent ab7376d commit bd672af

File tree

15 files changed

+90
-26
lines changed

15 files changed

+90
-26
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html>
1+
<!DOCTYPE html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html SYSTEM "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"><html><head></head><body></body></html>
1+
<!DOCTYPE html SYSTEM "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"><html><head></head><body></body></html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!--?xml version="1.0"?--><html><head></head><body></body></html>
1+
<!--?xml version="1.0"?--><html><head></head><body></body></html>

src/__fixtures__/doctype/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html>
1+
<!DOCTYPE html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<body><br />text<br />
22
<img />text
3-
</body>
3+
</body>

src/__fixtures__/element-void/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
<p>this<br />and that</p>
88

9-
<svg><path><circle><g><rect></rect></g></circle></path></svg>
9+
<svg><path><circle><g><rect/></g></circle></path></svg>
1010

11-
<svg><path></path><circle></circle><g></g><rect></rect></svg>
11+
<svg><path/><circle/><g/><rect/></svg>
1212

1313
<math><mglyph><mspace><malignmark></malignmark></mspace></mglyph></math>
1414

1515
<math><mglyph></mglyph><mspace></mspace><malignmark></malignmark></math>
16-
</body>
16+
</body>

src/__fixtures__/simple/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<!DOCTYPE html><html><head><title>Hello!</title></head><body><h1 id="world">World!<!--after-->
2-
</h1></body></html>
2+
</h1></body></html>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<li><svg class="icon" aria-label="Verified" viewBox="0 0 16 16" width="18" height="18" role="img"><path fill="currentcolor" fill-rule="evenodd" d="M15.67 7.066l-1.08-1.34a1.5 1.5 0 01-.309-.77l-.19-1.698a1.51 1.51 0 00-1.329-1.33l-1.699-.19c-.3-.03-.56-.159-.78-.329L8.945.33a1.504 1.504 0 00-1.878 0l-1.34 1.08a1.5 1.5 0 01-.77.31l-1.698.19c-.7.08-1.25.63-1.33 1.329l-.19 1.699c-.03.3-.159.56-.329.78L.33 7.055a1.504 1.504 0 000 1.878l1.08 1.34c.17.22.28.48.31.77l.19 1.698c.08.7.63 1.25 1.329 1.33l1.699.19c.3.03.56.159.78.329l1.339 1.08c.55.439 1.329.439 1.878 0l1.34-1.08c.22-.17.48-.28.77-.31l1.698-.19c.7-.08 1.25-.63 1.33-1.329l.19-1.699c.03-.3.159-.56.329-.78l1.08-1.339a1.504 1.504 0 000-1.878zM6.5 12.01L3 8.51l1.5-1.5 2 2 5-5L13 5.56l-6.5 6.45z"/></svg></li>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"type": "element",
3+
"tagName": "li",
4+
"properties": {},
5+
"children": [
6+
{
7+
"type": "element",
8+
"tagName": "svg",
9+
"properties": {
10+
"className": [
11+
"icon"
12+
],
13+
"ariaLabel": "Verified",
14+
"viewBox": [
15+
0,
16+
0,
17+
16,
18+
16
19+
],
20+
"width": 18,
21+
"height": 18,
22+
"role": "img"
23+
},
24+
"children": [
25+
{
26+
"type": "element",
27+
"tagName": "path",
28+
"properties": {
29+
"fill": "currentcolor",
30+
"fillRule": "evenodd",
31+
"d": "M15.67 7.066l-1.08-1.34a1.5 1.5 0 01-.309-.77l-.19-1.698a1.51 1.51 0 00-1.329-1.33l-1.699-.19c-.3-.03-.56-.159-.78-.329L8.945.33a1.504 1.504 0 00-1.878 0l-1.34 1.08a1.5 1.5 0 01-.77.31l-1.698.19c-.7.08-1.25.63-1.33 1.329l-.19 1.699c-.03.3-.159.56-.329.78L.33 7.055a1.504 1.504 0 000 1.878l1.08 1.34c.17.22.28.48.31.77l.19 1.698c.08.7.63 1.25 1.329 1.33l1.699.19c.3.03.56.159.78.329l1.339 1.08c.55.439 1.329.439 1.878 0l1.34-1.08c.22-.17.48-.28.77-.31l1.698-.19c.7-.08 1.25-.63 1.33-1.329l.19-1.699c.03-.3.159-.56.329-.78l1.08-1.339a1.504 1.504 0 000-1.878zM6.5 12.01L3 8.51l1.5-1.5 2 2 5-5L13 5.56l-6.5 6.45z"
32+
},
33+
"children": []
34+
}
35+
]
36+
}
37+
]
38+
}

src/__fixtures__/svg/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div>
22
<svg width="230" height="120" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3-
<circle cx="60" cy="60" r="50" fill="red"></circle>
4-
<circle cx="170" cy="60" r="50" fill="green"></circle>
3+
<circle cx="60" cy="60" r="50" fill="red"/>
4+
<circle cx="170" cy="60" r="50" fill="green"/>
55
</svg>
6-
</div>
6+
</div>

0 commit comments

Comments
 (0)