Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
Fixes #1: Some tables were imported with an extra header
Laurent Cozicc00d538f88f5
diff --git a/build_for_test.sh b/build_for_test.shindex 8401c24f6f..abdf1c4d7a 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/joplinCURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"set -enpm run builddiff --git a/src/tables.js b/src/tables.jsindex d48842817e..86aa7e9e52 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