$(IDENT)=[a-zA-Z0-9-:]+
doctype{Doctype=Preprocessor}:
  from <!DOCTYPE to >
comment:
  from <!-- to -->
entity{Entity=Escape}:
  match /&[A-Za-z]+;/
  match /&#[0-9]+;/
javascript{Markup}:
  limit
  from /<script.*?(type=["']text/javascript['"])?.*?>/ to </script> with javascript
css{Markup}:
  limit
  from /<style.*?(type=["']text/css['"])?.*?>/ to </style> with css
markup.limit{Markup=Keyword}:
  limit
  from /<(head|body)/ to //?>/
  @include html.markup
markup{Markup}:
  from /<$(IDENT)/ to //?>/
  @include html.markup
markup.close{Markup}:
  match /</$(IDENT)\s*>/
