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/images/doc/assets/DESCRIPTION?a=commitdiff_plain;h=88b991cd303157f00986f6c8b5d1bb223ac09737;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);