mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	Fixes #1: Some tables were imported with an extra header
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user