Fixes #1: Some tables were imported with an extra header

This commit is contained in:
Laurent Cozic 2019-10-12 19:32:33 +02:00
parent 6fb98621ce
commit c00d538f88
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -53,7 +53,7 @@ rules.table = {
content = content.replace(/\n+/g, '\n')
// If table has no heading, add an empty one so as to get a valid Markdown table
var secondLine = content.split('\n');
var secondLine = content.trim().split('\n');
if (secondLine.length >= 2) secondLine = secondLine[1]
var secondLineIsDivider = secondLine.indexOf('| ---') === 0