From: Benjamin Auder Date: Fri, 2 Feb 2018 19:30:55 +0000 (+0100) Subject: replace '#' by '+' in graph definition X-Git-Url: https://git.auder.net/doc/html/assets/scripts/img/current/%7B%7B%20targetUrl%20%7D%7D?a=commitdiff_plain;h=6a430a228d953ec4e9fe1b7fe324becb27d9ebbf;p=erdiag.git replace '#' by '+' in graph definition --- diff --git a/example.html b/example.html index 24d8953..4094835 100644 --- a/example.html +++ b/example.html @@ -13,13 +13,13 @@ 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] diff --git a/parser.js b/parser.js index f41a755..da8a1d5 100644 --- 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);