mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
fix(makemarkdown.table): col text now aligns right properly
This commit is contained in:
commit
1615b3ea15
|
@ -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, '-');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user