Skip to content

Commit

Permalink
Fix bugs for 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
haavardlian committed Feb 6, 2017
1 parent 57a5362 commit c33de0e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.3",
"version": "1.0.4",
"name": "escpos-print",
"bugs": {
"url": "https://github.com/haavardlian/escpos/issues"
Expand Down
2 changes: 1 addition & 1 deletion src/Test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const values = [
];

async function test() {
const consoleAdapter = new Console();
const consoleAdapter = new Console(32);
const p = await new Printer(consoleAdapter, "CP865").open();
p.init()
.setJustification(Justification.Center)
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/Console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class Console extends Adapter {

public write(data: Buffer): Promise<undefined> {
return new Promise((resolve) => {
const regex = new RegExp(`/(.{${this.numbersPerLine * 3}})`, "g");
const regex = new RegExp(`(.{${this.numbersPerLine * 3}})`, "g");
// tslint:disable-next-line no-console
console.log(data.toString("hex").replace(/(.{2})/g, "$1 ").replace(regex, "$1\n"));
resolve();
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"src/adapters/Console.ts",
"src/adapters/Network.ts",
"src/adapters/Serial.ts",
"src/adapters/PNG.ts",
"src/Printer.ts",
"src/Commands.ts",
"src/Image.ts",
Expand Down

0 comments on commit c33de0e

Please sign in to comment.