Skip to content

Commit 567d1ca

Browse files
authored
Merge pull request #76 from Trakkasure/bugfix/fix-missing-caps-in-regexp
Fixes #75. Added A-Z to RegEx.
2 parents e7cf2cd + f2010b6 commit 567d1ca

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

examples/getInterfacesAndRoutes.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ var device=new api(/* Host */'10.10.10.10' /*, Port */ /*, Timeout */);
44
// device.setDebug(api.DEBUG);
55

66
// connect: user, password.
7-
device.connect().then(([login])=>login('username','password')).then(function(conn) {
7+
device.connect()
8+
.then(([login])=>login('username','password'))
9+
.then(function(conn) {
810
var c1=conn.openChannel();
911
var c2=conn.openChannel();
1012
c1.closeOnDone(true);
@@ -29,6 +31,7 @@ device.connect().then(([login])=>login('username','password')).then(function(con
2931
console.log(JSON.stringify(data.data,true,2));
3032
});
3133

32-
},function(err) {
33-
console.log("Error connecting:",err);
34+
})
35+
.catch(function(err) {
36+
console.log("Error during processing:",err);
3437
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mikronode",
33
"description": "Mikrotik API implemented in Node",
4-
"version": "2.3.10",
4+
"version": "2.3.11",
55
"author": "Brandon Myers <trakkasure@gmail.com>",
66
"scripts": {
77
"prebuild": "pegjs src/parser.g",

src/parser.g

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ data
1717
= id:identifier value:value s { return {field:id, value:value}}
1818

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

2222
value
2323
= v:[^\r\n\0]+ {return v.join('')}
@@ -55,4 +55,4 @@ null
5555
= [\0x00]
5656

5757
colon
58-
= [:]
58+
= [:]

0 commit comments

Comments
 (0)