diff --git a/src/index.js b/src/index.js index 6877dd2..8dae906 100644 --- a/src/index.js +++ b/src/index.js @@ -14,7 +14,9 @@ const TAGS_TO_BREAK_ON = [ "h6", "ol", "ul", - "li" + "li", + "table", + "td" ]; module.exports = (text = "") => diff --git a/src/index.test.js b/src/index.test.js index 2a1b337..c83e25c 100644 --- a/src/index.test.js +++ b/src/index.test.js @@ -66,4 +66,16 @@ describe("lib", () => { const result = lib("some text"); expect(result).to.equal("some text"); }); + + it("should replace tables with new lines", () => { + const result = lib("some
text1 | text2 |