diff --git a/build_for_test.sh b/build_for_test.sh index 8401c24f6..abdf1c4d7 100755 --- a/build_for_test.sh +++ b/build_for_test.sh @@ -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 diff --git a/src/tables.js b/src/tables.js index d48842817..86aa7e9e5 100644 --- a/src/tables.js +++ b/src/tables.js @@ -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