Skip to content

Commit

Permalink
Merge pull request #76 from Trakkasure/bugfix/fix-missing-caps-in-regexp
Browse files Browse the repository at this point in the history
Fixes #75. Added A-Z to RegEx.
  • Loading branch information
Trakkasure authored Apr 15, 2018
2 parents e7cf2cd + f2010b6 commit 567d1ca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions examples/getInterfacesAndRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ var device=new api(/* Host */'10.10.10.10' /*, Port */ /*, Timeout */);
// device.setDebug(api.DEBUG);

// connect: user, password.
device.connect().then(([login])=>login('username','password')).then(function(conn) {
device.connect()
.then(([login])=>login('username','password'))
.then(function(conn) {
var c1=conn.openChannel();
var c2=conn.openChannel();
c1.closeOnDone(true);
Expand All @@ -29,6 +31,7 @@ device.connect().then(([login])=>login('username','password')).then(function(con
console.log(JSON.stringify(data.data,true,2));
});

},function(err) {
console.log("Error connecting:",err);
})
.catch(function(err) {
console.log("Error during processing:",err);
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mikronode",
"description": "Mikrotik API implemented in Node",
"version": "2.3.10",
"version": "2.3.11",
"author": "Brandon Myers <[email protected]>",
"scripts": {
"prebuild": "pegjs src/parser.g",
Expand Down
4 changes: 2 additions & 2 deletions src/parser.g
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ data
= id:identifier value:value s { return {field:id, value:value}}

identifier
= "=" id:[\.a-z\-0-9]+ "=" {return id.join('')}
= "=" id:[\.a-zA-Z\-0-9]+ "=" {return id.join('')}

value
= v:[^\r\n\0]+ {return v.join('')}
Expand Down Expand Up @@ -55,4 +55,4 @@ null
= [\0x00]

colon
= [:]
= [:]

0 comments on commit 567d1ca

Please sign in to comment.