Turndown: remove \n in table cell

When pasting table from OneNote, there may be redundant \n that will
break the table.
This commit is contained in:
Le Tan 2018-10-17 20:01:28 +08:00
parent 627664bb0e
commit 0eab02de9b

View File

@ -44,6 +44,7 @@ var configs = { autoHead: false };
rules.tableCell = {
filter: ['th', 'td'],
replacement: function (content, node) {
content = content.replace(/[\r\n]/g, '');
return cell(content, node)
}
};