1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-13 22:12:50 +02:00

There must be at least 3 dashes separating each header cell.

This commit is contained in:
Laurent Cozic
2017-07-20 19:58:06 +01:00
parent f529b9e3b9
commit 7bea097b42
3 changed files with 7 additions and 4 deletions

View File

@@ -542,6 +542,9 @@ function drawTable(table, colWidths) {
// | Content Cell | Content Cell | // | Content Cell | Content Cell |
// | Content Cell | Content Cell | // | Content Cell | Content Cell |
// There must be at least 3 dashes separating each header cell.
// https://gist.github.com/IanWang/28965e13cdafdef4e11dc91f578d160d#tables
const minColWidth = 3;
let lines = []; let lines = [];
let headerDone = false; let headerDone = false;
for (let trIndex = 0; trIndex < table.lines.length; trIndex++) { for (let trIndex = 0; trIndex < table.lines.length; trIndex++) {
@@ -551,7 +554,7 @@ function drawTable(table, colWidths) {
let headerLine = []; let headerLine = [];
let emptyHeader = null; let emptyHeader = null;
for (let tdIndex = 0; tdIndex < colWidths.length; tdIndex++) { for (let tdIndex = 0; tdIndex < colWidths.length; tdIndex++) {
const width = colWidths[tdIndex]; const width = Math.max(minColWidth, colWidths[tdIndex]);
const cell = tr.lines[tdIndex] ? tr.lines[tdIndex].content : ''; const cell = tr.lines[tdIndex] ? tr.lines[tdIndex].content : '';
line.push(stringPadding(cell, width, ' ', stringPadding.RIGHT)); line.push(stringPadding(cell, width, ' ', stringPadding.RIGHT));

View File

@@ -7,7 +7,7 @@
"url": "https://github.com/laurent22/joplin" "url": "https://github.com/laurent22/joplin"
}, },
"url": "git://github.com/laurent22/joplin.git", "url": "git://github.com/laurent22/joplin.git",
"version": "0.8.62", "version": "0.8.63",
"bin": { "bin": {
"joplin": "./main_launcher.js" "joplin": "./main_launcher.js"
}, },

View File

@@ -90,8 +90,8 @@ android {
applicationId "net.cozic.joplin" applicationId "net.cozic.joplin"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 22 targetSdkVersion 22
versionCode 23 versionCode 24
versionName "0.9.10" versionName "0.9.11"
ndk { ndk {
abiFilters "armeabi-v7a", "x86" abiFilters "armeabi-v7a", "x86"
} }