You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
formatRow=(row,alignments,columnWidths)->
# applypaddingaroundeachcellforalignmentandcolumnwidthforiin[0...row.length]row[i]=(switchalignments[i]when'right'pad(columnWidths[i],row[i])when'center'
# roundingcausesabiastotheleftbecausewecan't have half a char
whitespace = columnWidths[i] - row[i].length
leftPadded = pad(Math.floor(whitespace / 2) + row[i].length, row[i])
pad(leftPadded, Math.ceil(whitespace / 2) + leftPadded.length)
else
######### I modify here #########
# left is the default alignment when formatting
pad(row[i], columnWidths[i] - (row[i].replace(/[^\u0000-\u00ff]/g,"aa").length - row[i].length))
)
# trimRight is to remove any trailing whitespace added by the padding
joinColumns(row).trimRight()
I write coffeescript and javascript for the first time, the code is a bit ugly, hope you can fix it in the new realse.
The text was updated successfully, but these errors were encountered:
I set atom Font "新宋体"
My md is as below:
Format with tidy-markdown
Format with markdown-writer
I temporarily modify .atom\packages\tidy-markdown\node_modules\tidy-markdown\lib\tables.coffee to avoid the problem
I write coffeescript and javascript for the first time, the code is a bit ugly, hope you can fix it in the new realse.
The text was updated successfully, but these errors were encountered: