diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-09-16 00:01:13 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-09-16 00:01:13 -0700 |
| commit | c1e489048f7b860c1342b04fa7b3a6baced6ee39 (patch) | |
| tree | 3eb47c1af70db4a94da3c0db5a73109965daa7da | |
| parent | 018f2b06ce2e2a44ee6c1379f94db38aaec73d6c (diff) | |
Fixed grammar
| -rw-r--r-- | grammars/html.bpeg | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/grammars/html.bpeg b/grammars/html.bpeg index 9d74f5e..f3d76fd 100644 --- a/grammars/html.bpeg +++ b/grammars/html.bpeg @@ -1,7 +1,7 @@ # HTML grammar HTML = __ ?(doctype __) *html-element%__ __; -doctype = "<!DOCTYPE" &`>; +doctype = "<!DOCTYPE" ..`>; html-element = ( >(`<("area"/"base"/"br"/"col"/"embed"/"hr"/"img"/"input"/"link"/"meta"/"param"/"source"/"track"/"wbr")) void-element @@ -17,11 +17,11 @@ raw-element = `< @[tag](id==match-tag) __attributes__ `> >match-body @[body].. ( normal-element = `< @[tag](id==match-tag) __attributes__ `> >match-body @[body]*(!`<$. / comment / html-element / !("</"tag__`>)$.) "</"tag__`>; -comment = "<!--" &&"-->"; +comment = "<!--" ..."-->"; attributes = *(!(attribute==match-attribute))%__ __(attribute==match-attribute)__ *attribute%__; -attribute = (+id%`:)__`=__ (id / `" &`" / `' &`'); -attribute = (+id%`:)__`=__ (id / `" .. `" / `' .. `'); +attribute = (+id%`:)__`=__ (id / `" ..`" / `' ..`'); +attribute = (+id%`:)__`=__ (id / `" ..`" / `' ..`'); match-attribute = attribute; match-tag = id; match-body = (/); |
