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
Thanks for the great library! I found a bug in the graph writer:
Consider a graph with a node attribute x=-1.4703333520951247e-16, when writing and reading the same graph, graphlib-dot yields TypeError: v is null in peg$c34:
vardot=require('graphlib-dot');vargraphlib=require('graphlib');// prepare graphvargraph=newgraphlib.Graph({directed: false});graph.setNode(42,{x: -1.4703333520951247e-16});// show outputdot.write(graph);// -> 'strict graph {\n "42" [x=-1.4703333520951247e-16]\n}\n'// trigger TypeErrordot.read(dot.write(graph));// Uncaught TypeError: Cannot read property '3' of null// at peg$c34 (node_modules/graphlib-dot/lib/dot-grammar.js:114:28)// at peg$parseidDef (node_modules/graphlib-dot/lib/dot-grammar.js:1421:16)// at peg$parseaList (node_modules/graphlib-dot/lib/dot-grammar.js:1173:20)// at peg$parseattrListBlock (node_modules/graphlib-dot/lib/dot-grammar.js:1093:16)// at peg$parseattrList (node_modules/graphlib-dot/lib/dot-grammar.js:1012:12)// at peg$parsenodeStmt (node_modules/graphlib-dot/lib/dot-grammar.js:808:16)// at peg$parsestmt (node_modules/graphlib-dot/lib/dot-grammar.js:689:20)// at peg$parsestmtList (node_modules/graphlib-dot/lib/dot-grammar.js:538:12)// at peg$parsegraphStmt (node_modules/graphlib-dot/lib/dot-grammar.js:452:28)// at Object.parse (node_modules/graphlib-dot/lib/dot-grammar.js:2372:18)
I think dot.write() produces a non-compliant string (because the ID is not allowed to have a dash -). The parser looks fine.
Thanks for the great library! I found a bug in the graph writer:
Consider a graph with a node attribute
x=-1.4703333520951247e-16
, when writing and reading the same graph, graphlib-dot yieldsTypeError: v is null
inpeg$c34
:I think
dot.write()
produces a non-compliant string (because the ID is not allowed to have a dash-
). The parser looks fine.I'm using
[email protected]
.The text was updated successfully, but these errors were encountered: