Fix importing tables that contain pipes

This commit is contained in:
Laurent Cozic 2019-09-07 10:27:01 +01:00
parent b33431774b
commit 3358d85996
2 changed files with 2 additions and 1 deletions

2
build_for_test.sh Normal file → Executable file
View File

@ -1,5 +1,5 @@
#!/bin/bash
ROOT_DIR=/mnt/d/Web/www/joplin
ROOT_DIR=/Users/laurent/src/joplin
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
set -e
npm run build

View File

@ -109,6 +109,7 @@ function cell (content, node = null, index = null) {
var prefix = ' '
if (index === 0) prefix = '| '
let filteredContent = content.trim().replace(/\n\r/g, '<br>').replace(/\n/g, "<br>");
filteredContent = filteredContent.replace(/\|+/g, '\\|')
while (filteredContent.length < 3) filteredContent += ' ';
if (node) filteredContent = handleColSpan(filteredContent, node, ' ');
return prefix + filteredContent + ' |'