Skip to content

Commit

Permalink
fix: update remark-gridtables (#424)
Browse files Browse the repository at this point in the history
fixes #423
  • Loading branch information
tripodsan authored Feb 28, 2024
1 parent dac4d9a commit 2c9f832
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
36 changes: 36 additions & 0 deletions test/fixtures/self-closing-breaks.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<html>
<head></head>
<body>
<header></header>
<main>
<div>
<h1>test br element</h1>
<div class="table">
<div>
<div></div>
<div>Number</div>
<div>Colors</div>
</div>
<div>
<div>BR without closing the tag</div>
<div>17</div>
<div>Green<br>Red<br>Blue</div>
</div>
<div>
<div>BR without closing the tag in a P</div>
<div>60</div>
<div>
<p>See image<br></p>
</div>
</div>
<div>
<div>BR with self-closing the tag</div>
<div>60</div>
<div>Green<br />Red<br />Blue</div>
</div>
</div>
</div>
</main>
<footer></footer>
</body>
</html>
17 changes: 17 additions & 0 deletions test/fixtures/self-closing-breaks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# test br element

+--------------------------------------------------------+
| Table |
+===================================+========+===========+
| | Number | Colors |
+-----------------------------------+--------+-----------+
| BR without closing the tag | 17 | Green\ |
| | | Red\ |
| | | Blue |
+-----------------------------------+--------+-----------+
| BR without closing the tag in a P | 60 | See image |
+-----------------------------------+--------+-----------+
| BR with self-closing the tag | 60 | Green\ |
| | | Red\ |
| | | Blue |
+-----------------------------------+--------+-----------+
4 changes: 4 additions & 0 deletions test/html2md.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ describe('html2md Tests', () => {
it('convert a document with headline and soft breaks correctly', async () => {
await test('breaks-in-headings');
});

it('convert a document with self-closing breaks correctly', async () => {
await test('self-closing-breaks');
});
});

describe('className to block type tests', () => {
Expand Down

0 comments on commit 2c9f832

Please sign in to comment.