replace '#' by '+' in graph definition
authorBenjamin Auder <benjamin.auder@somewhere>
Fri, 2 Feb 2018 19:30:55 +0000 (20:30 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Fri, 2 Feb 2018 22:11:19 +0000 (23:11 +0100)
example.html
parser.js

index 24d8953..4094835 100644 (file)
        let er =
                new ErDiags(`
                        [Musician]
-                       #id (integer)
+                       +id (integer)
                        name
                        band
                        role (varchar not null)
 
                        [Instrument]
-                       #name
+                       +name
                        family (varchar not null default "Brass")
 
                        [Piano]
index f41a755..da8a1d5 100644 (file)
--- a/parser.js
+++ b/parser.js
@@ -94,7 +94,7 @@ class ErDiags
                {
                        let field = { };
                        let line = lines[i];
-                       if (line.charAt(0) == '#')
+                       if (line.charAt(0) == '+')
                        {
                                field.isKey = true;
                                line = line.slice(1);