From 5f85c53910e500af52363719912d20c416bd3d83 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 1 May 2019 12:56:38 +0200 Subject: [PATCH] fix(makemarkdown.table): col text align right fix for html columns align right. currently hmtl cols with align right get converted to md with align center e.g. html head get converted to :---: (suddenly center) this pull request fixes that bug --- src/subParsers/makemarkdown/table.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subParsers/makemarkdown/table.js b/src/subParsers/makemarkdown/table.js index 1fb1f94..d84e64b 100644 --- a/src/subParsers/makemarkdown/table.js +++ b/src/subParsers/makemarkdown/table.js @@ -55,7 +55,7 @@ showdown.subParser('makeMarkdown.table', function (node, globals) { for (ii = 0; ii < tableArray[i].length; ++ii) { if (i === 1) { if (tableArray[i][ii].slice(-1) === ':') { - tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii].slice(-1), cellSpacesCount - 1, '-') + ':'; + tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii].slice(0, -1), cellSpacesCount - 1, '-') + ':'; } else { tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount, '-'); }