# Syntax definitions for some HTML-specific patterns # # NOTE: this is *NOT* intended to be a complete definition of the language's # syntax! Providing a full language grammar is overkill, because the intended # use case is finding/replacing string patterns. This task does not require a # full parse tree, and having one makes the task considerably more complicated. # See the accompanying README.md for more info. doctype: " element: void-element / raw-element / template-element / normal-element void-element: `< ("area"/"base"/"br"/"col"/"embed"/"hr"/"img"/"input"/"link"/"meta"/"param"/"source"/"track"/"wbr") __attributes__ [`/] __ `> template-element: "" raw-element: `< @tag=("script"/"style"/"textarea"/"title") __attributes__ `> ..%\n " normal-element: `< @tag=id __attributes__ `> ..%(\n / comment / element) " comment: "" attributes: *attribute%__ attribute: (+id%`:)__`=__ (id / string)