Skip to content

Commit 6f66926

Browse files
fix: blocksToHTMLLossy props as data- attributes (#1068)
* Added props data attributes to lossy HTML * Reduced duplicate code * Updated `data-` attributes to filter out and react snapshots * Updated snapshots
1 parent 5026e27 commit 6f66926

File tree

60 files changed

+111
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+111
-62
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<h2 class="bn-inline-content"><strong><u>Heading </u></strong><em><s>2</s></em></h2><p class="bn-inline-content">Paragraph</p><ul><li><p class="bn-inline-content"></p></li></ul>
1+
<h2 data-text-color="yellow" data-background-color="blue" data-text-alignment="right" data-level="2"><strong><u>Heading </u></strong><em><s>2</s></em></h2><p data-background-color="red">Paragraph</p><ul><li><p class="bn-inline-content"></p></li></ul>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<p class="custom-paragraph">Hello World</p>
1+
<p class="custom-paragraph" data-text-color="orange" data-background-color="pink" data-text-alignment="center">Hello World</p>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div><a href="exampleURL">example</a><p>Caption</p></div>
1+
<div data-name="example" data-url="exampleURL" data-caption="Caption"><a href="exampleURL">example</a><p>Caption</p></div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div><a href="exampleURL">example</a><p>Caption</p></div><div><a href="exampleURL">example</a><p>Caption</p></div>
1+
<div data-name="example" data-url="exampleURL" data-caption="Caption"><a href="exampleURL">example</a><p>Caption</p></div><div data-name="example" data-url="exampleURL" data-caption="Caption"><a href="exampleURL">example</a><p>Caption</p></div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<a href="exampleURL">example</a>
1+
<a href="exampleURL" data-name="example" data-url="exampleURL">example</a>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div><a href="exampleURL">exampleURL</a><p>Caption</p></div>
1+
<div data-url="exampleURL" data-caption="Caption"><a href="exampleURL">exampleURL</a><p>Caption</p></div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<p class="bn-inline-content"><span style="font-size: 18px" data-style-type="fontSize" data-value="18px" data-editable="">This is text with a custom fontSize</span></p>
1+
<p><span style="font-size: 18px" data-style-type="fontSize" data-value="18px" data-editable="">This is text with a custom fontSize</span></p>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<p class="bn-inline-content">Text1<br>Text2</p>
1+
<p>Text1<br>Text2</p>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<p class="bn-inline-content"><a target="_blank" rel="noopener noreferrer nofollow" href="https://www.website.com">Link1</a><br><a target="_blank" rel="noopener noreferrer nofollow" href="https://www.website2.com">Link2</a></p>
1+
<p><a target="_blank" rel="noopener noreferrer nofollow" href="https://www.website.com">Link1</a><br><a target="_blank" rel="noopener noreferrer nofollow" href="https://www.website2.com">Link2</a></p>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<p class="bn-inline-content">Text1<br></p>
1+
<p>Text1<br></p>

0 commit comments

Comments
 (0)