3
V'íc§M ã @ s& d Z ddlZddlmZmZmZmZmZmZ ddl m
Z
mZmZm
Z
mZmZmZmZ ddlmZmZ ddlmZ ddlmZ ddlmZmZmZ dd lmZ d
ddd
dddgZG dd
d
eZ G dd deZ!G dd deZ"G dd
d
e"Z#G dd deZ$G dd deZ%G dd deZ&e&Z'dS )zÕ
pygments.lexers.html
~~~~~~~~~~~~~~~~~~~~
Lexers for HTML, XML and related markup.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
é N)Ú
RegexLexerÚExtendedRegexLexerÚincludeÚbygroupsÚdefaultÚusing)ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚPunctuationÚ
Whitespace)Úlooks_like_xmlÚhtml_doctype_matches)ÚJavascriptLexer)Ú
ScalaLexer)ÚCssLexerÚ_indentationÚ
_starts_block)Ú RubyLexerÚ HtmlLexerÚDtdLexerÚXmlLexerÚ XsltLexerÚ HamlLexerÚ
ScamlLexerÚPugLexerc @ s e Zd ZdZdZdZdgZddddgZd d
gZe j
e jB Zde
fdejfd
ejfdejfdejfdejfdeee
eje
d+fdeee
eje
d,fdeee
ejdfdeee
ee
eje
efg
de
fdeejee
dfdejfdeee
edfgdeee
ee
eje
edfdeefd eedfd!eedfgd"eee
ee
eje
edfd#eefd eedfd!eedfgd$edfd%edfd&edfgd'Zd(d) Zd*S )-r zo
For HTML 4 and XHTML 1 markup. Nested JavaScript and CSS is highlighted
by the appropriate lexer.
ZHTMLzhttps://html.spec.whatwg.org/Úhtmlz*.htmlz*.htmz*.xhtmlz*.xsltz text/htmlzapplication/xhtml+xmlz[^<&]+z&\S*?;z\<\!\[CDATA\[.*?\]\]\>z
<!--.*?-->z <\?.*?\?>z<![^>]*>z(<)(\s*)(script)(\s*)úscript-contentÚtagz(<)(\s*)(style)(\s*)ú
style-contentz(<)(\s*)([\w:.-]+)z"(<)(\s*)(/)(\s*)([\w:.-]+)(\s*)(>)z\s+z([\w:-]+\s*)(=)(\s*)Úattrz[\w:-]+z(/?)(\s*)(>)z#popz (<)(\s*)(/)(\s*)(script)(\s*)(>)z.+?(?=<\s*/\s*script\s*>)z.+?\nz.+z(<)(\s*)(/)(\s*)(style)(\s*)(>)z.+?(?=<\s*/\s*style\s*>)z".*?"z'.*?'z[^\s>]+)Úrootr! zscript-contentz
style-contentr# c C s t | rdS d S )Ng à?)r )Útext© r&