Skip to content

Commit 177df33

Browse files
committed
remove all new lines in table cell instead of only the first occurrence
1 parent 46e019f commit 177df33

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "HTML Table to Markdown",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "Convert an HTML Table to Markdown for easy export.",
55
"manifest_version": 2,
66
"devtools_page": "devtools.html",

panel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const convertToMatrix = node => {
7777
// copy the elements into all cells that are spanned
7878
for (let colCount = 0; colCount < colspan; colCount++) {
7979
for (let rowCount = 0; rowCount < rowspan; rowCount++) {
80-
tableMatrix[rowIndex + rowCount].push(tableElement.innerText.replace('\n', ' '))
80+
tableMatrix[rowIndex + rowCount].push(tableElement.innerText.replace(/\n/g, ' '))
8181
}
8282
}
8383
})

0 commit comments

Comments
 (0)