Skip to content

Commit

Permalink
left空格不删
Browse files Browse the repository at this point in the history
  • Loading branch information
gerow-x committed May 13, 2022
1 parent 3e313ed commit 2fe62ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/adapter/esc.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ escpos.Printer.prototype.tableCustomExt = function (data, encoding) {
}
if (obj.text !== '') { lineStr += obj.text.trim() }
} else {
if (obj.text !== '') { lineStr += obj.text.trim() }
if (obj.text !== '') { lineStr += obj.text.trimRight() }

const spaces = cellWidth - calWords(obj.text.trim())
const spaces = cellWidth - calWords(obj.text.trimRight())
for (let j = 0; j < spaces; j++) {
lineStr += ' '
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@posprint/command-builder",
"version": "0.0.38",
"version": "0.0.39",
"description": "JavaScript library that implements the ESC/POS and TSC protocol to buffer.",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 2fe62ab

Please sign in to comment.