diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-09-13 23:31:38 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-09-13 23:31:38 -0700 |
| commit | 4135115229d27c54b70cd945e2211e652ab58d2f (patch) | |
| tree | d81a088a3ee56b7f28252c14d2ffe2ba1d0bd7ae /grammars/html.bpeg | |
| parent | 1570dd55e8f3601e72893d6954044317973d7c60 (diff) | |
Spruced up a bunch of stuff, tweaked the grammar, added docs
Diffstat (limited to 'grammars/html.bpeg')
| -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 7f8976a..9d74f5e 100644 --- a/grammars/html.bpeg +++ b/grammars/html.bpeg @@ -11,17 +11,17 @@ html-element = ( void-element = `< @[tag](id==match-tag) __attributes__ `/? __ `>; -template-element = `< @[tag](id==match-tag) __`> __ >match-body @[body]0+(~~`< / comment / html-element / ~~("</"tag__`>)) ("</"tag__`>); +template-element = `< @[tag](id==match-tag) __`> __ >match-body @[body]0+(!`<$. / comment / html-element / !("</"tag__`>)$.) ("</"tag__`>); -raw-element = `< @[tag](id==match-tag) __attributes__ `> >match-body @[body]*~~("</"tag__`>) ("</"tag__`>); +raw-element = `< @[tag](id==match-tag) __attributes__ `> >match-body @[body].. ("</"tag__`>); -normal-element = `< @[tag](id==match-tag) __attributes__ `> >match-body @[body]*(~~`< / comment / html-element / ~~("</"tag__`>)) "</"tag__`>; +normal-element = `< @[tag](id==match-tag) __attributes__ `> >match-body @[body]*(!`<$. / comment / html-element / !("</"tag__`>)$.) "</"tag__`>; comment = "<!--" &&"-->"; attributes = *(!(attribute==match-attribute))%__ __(attribute==match-attribute)__ *attribute%__; attribute = (+id%`:)__`=__ (id / `" &`" / `' &`'); -attribute = (+id%`:)__`=__ (id / `" *~`" `" / `' *~`' `'); +attribute = (+id%`:)__`=__ (id / `" .. `" / `' .. `'); match-attribute = attribute; match-tag = id; match-body = (/); |
