-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(HTML): Fixes to list and table encoding for compatability with ad…
…dress resolving algorithm
- Loading branch information
Showing
10 changed files
with
352 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<p>Example based on how a Pandas dat a frame is encoded to HTML in a Jupyter notebook:</p> | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th></th> | ||
<th>a</th> | ||
<th>b</th> | ||
<th>c</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<th>0</th> | ||
<td>1</td> | ||
<td>2</td> | ||
<td>3</td> | ||
</tr> | ||
<tr> | ||
<th>1</th> | ||
<td>4</td> | ||
<td>5</td> | ||
<td>6</td> | ||
</tr> | ||
<tr> | ||
<th>2</th> | ||
<td>7</td> | ||
<td>8</td> | ||
<td>9</td> | ||
</tr> | ||
</tbody> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
140 changes: 140 additions & 0 deletions
140
rust/src/methods/decode/snapshots/html_fragments@table.html.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
--- | ||
source: rust/src/methods/decode/html.rs | ||
expression: "decode_fragment(&content, false)" | ||
input_file: fixtures/fragments/html/table.html | ||
|
||
--- | ||
[ | ||
{ | ||
"type": "Paragraph", | ||
"content": [ | ||
"Example based on how a Pandas dat a frame is encoded to HTML in a Jupyter notebook:" | ||
] | ||
}, | ||
{ | ||
"type": "Table", | ||
"rows": [ | ||
{ | ||
"type": "TableRow", | ||
"cells": [ | ||
{ | ||
"type": "TableCell", | ||
"cellType": "Header" | ||
}, | ||
{ | ||
"type": "TableCell", | ||
"cellType": "Header", | ||
"content": [ | ||
"a" | ||
] | ||
}, | ||
{ | ||
"type": "TableCell", | ||
"cellType": "Header", | ||
"content": [ | ||
"b" | ||
] | ||
}, | ||
{ | ||
"type": "TableCell", | ||
"cellType": "Header", | ||
"content": [ | ||
"c" | ||
] | ||
} | ||
], | ||
"rowType": "Header" | ||
}, | ||
{ | ||
"type": "TableRow", | ||
"cells": [ | ||
{ | ||
"type": "TableCell", | ||
"cellType": "Header", | ||
"content": [ | ||
"0" | ||
] | ||
}, | ||
{ | ||
"type": "TableCell", | ||
"content": [ | ||
"1" | ||
] | ||
}, | ||
{ | ||
"type": "TableCell", | ||
"content": [ | ||
"2" | ||
] | ||
}, | ||
{ | ||
"type": "TableCell", | ||
"content": [ | ||
"3" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "TableRow", | ||
"cells": [ | ||
{ | ||
"type": "TableCell", | ||
"cellType": "Header", | ||
"content": [ | ||
"1" | ||
] | ||
}, | ||
{ | ||
"type": "TableCell", | ||
"content": [ | ||
"4" | ||
] | ||
}, | ||
{ | ||
"type": "TableCell", | ||
"content": [ | ||
"5" | ||
] | ||
}, | ||
{ | ||
"type": "TableCell", | ||
"content": [ | ||
"6" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "TableRow", | ||
"cells": [ | ||
{ | ||
"type": "TableCell", | ||
"cellType": "Header", | ||
"content": [ | ||
"2" | ||
] | ||
}, | ||
{ | ||
"type": "TableCell", | ||
"content": [ | ||
"7" | ||
] | ||
}, | ||
{ | ||
"type": "TableCell", | ||
"content": [ | ||
"8" | ||
] | ||
}, | ||
{ | ||
"type": "TableCell", | ||
"content": [ | ||
"9" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.