3

V'íc§Mã@s&dZddlZddlmZmZmZmZmZmZddl	m
Z
mZmZm
Z
mZmZmZmZddlmZmZddlmZddlmZddlmZmZmZdd	lmZd
ddd
dddgZGdd
„d
eƒZ Gdd„deƒZ!Gdd„deƒZ"Gdd
„d
e"ƒZ#Gdd„deƒZ$Gdd„deƒZ%Gdd„deƒZ&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–eZdZdZdZdZdgZddddgZd	d
gZe	j
e	jBZde
fdejfd
ejfdejfdejfdejfdeee
eje
ƒd+fdeee
eje
ƒd,fdeee
ejƒdfdeee
ee
eje
eƒfg
de
fdeejee
ƒdfdejfdeee
eƒdfgdeee
ee
eje
eƒdfdeeƒfd eeƒdfd!eeƒdfgd"eee
ee
eje
eƒdfd#eeƒfd eeƒdfd!eeƒdfgd$edfd%edfd&edfgd'œZd(d)„Zd*S)-rzo
    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#cCst|ƒrdSdS)Ngà?)r)Útext©r&ú8/tmp/pip-build-gk9425m9/Pygments/pygments/lexers/html.pyÚanalyse_texteszHtmlLexer.analyse_textN)r r!)r"r!)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚurlÚaliasesÚ	filenamesÚ	mimetypesÚreÚ
IGNORECASEÚDOTALLÚflagsrrÚEntityr	ÚPreprocÚ	MultilinerrÚTagÚ	Attributer
rrrr
Útokensr(r&r&r&r'rsZ

c@s”eZdZdZejejBZdZdgZ	dgZ
dgZedƒde
eeejƒdfd	e
eeejƒd
fde
eeejƒdfd
e
eeejƒdfde
eejeeƒfde
eeejƒfdejfdefg	defdejfdedfdefdejfdejfgdefdedfdefgedƒdejfdejfd edfgedƒd!ejfd"ejfd#ejfdejfd edfgedƒd$ejfdejfd edfgedƒd%ejfdejfd edfgd&œZd'd(„Zd)S)*rzR
    A lexer for DTDs (Document Type Definitions).

    .. versionadded:: 1.5
    ZDTDZdtdz*.dtdzapplication/xml-dtdÚcommonz(<!ELEMENT)(\s+)(\S+)Úelementz(<!ATTLIST)(\s+)(\S+)Úattlistz(<!ENTITY)(\s+)(\S+)Úentityz(<!NOTATION)(\s+)(\S+)Únotationz(<!\[)([^\[\s]+)(\s*)(\[)z(<!DOCTYPE)(\s+)([^>\s]+)z
PUBLIC|SYSTEMz[\[\]>]z\s+z(%|&)[^;]*;z<!--Úcommentz	[(|)*,?+]z"[^"]*"z
\'[^\']*\'z[^-]+z-->z#popú-zEMPTY|ANY|#PCDATAz[^>\s|()?+*,]+ú>z?CDATA|IDREFS|IDREF|ID|NMTOKENS|NMTOKEN|ENTITIES|ENTITY|NOTATIONz#REQUIRED|#IMPLIED|#FIXEDzxml:space|xml:langzSYSTEM|PUBLIC|NDATAz
SYSTEM|PUBLIC)r$r<rAr=r>r?r@cCs*t|ƒr&d|ks"d|ks"d|kr&dSdS)Nz	<!ELEMENTz	<!ATTLISTz<!ENTITYgš™™™™™é?)r)r%r&r&r'r(¼s
zDtdLexer.analyse_textN)r)r*r+r,r2Ú	MULTILINEr4r5r-r/r0r1rrrrrr9r6ÚConstantr	r
r
ÚDoubleÚSingleZReservedr:r;r(r&r&r&r'rjsd



c
@sØeZdZdZejejBZdZdgZ	dddddd	d
gZ
ddd
ddgZdefde
fdejfdejfdejfdejfdejfdejdfdejfg	de
fdejdfdejdfgde
fdedfd edfd!edfgd"œZd#d$„Zd%S)&rz=
    Generic lexer for XML (eXtensible Markup Language).
    ÚXMLÚxmlz*.xmlz*.xslz*.rssz*.xsltz*.xsdz*.wsdlz*.wsfztext/xmlzapplication/xmlz
image/svg+xmlzapplication/rss+xmlzapplication/atom+xmlz[^<&\s]+z[^<&\S]+z&\S*?;z\<\!\[CDATA\[.*?\]\]\>z
<!--.*?-->z	<\?.*?\?>z<![^>]*>z<\s*[\w:.-]+r!z<\s*/\s*[\w:.-]+\s*>z\s+z[\w.:-]+\s*=r#z/?\s*>z#popz".*?"z'.*?'z[^\s>]+)r$r!r#cCst|ƒrdSdS)NgÍÌÌÌÌÌÜ?)r)r%r&r&r'r(észXmlLexer.analyse_textN)r)r*r+r,r2rDr4r5r-r/r0r1rrrr6r	r7r8r9r:r
r;r(r&r&r&r'rÂs2



c#@s†eZdZdZdZdgZdddgZddgZd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+h#Zd,d-„Z	d.d/„Z
d0S)1rz7
    A lexer for XSLT.

    .. versionadded:: 0.10
    ZXSLTZxsltz*.xslz*.xsltz*.xplzapplication/xsl+xmlzapplication/xslt+xmlz
apply-importszapply-templatesÚ	attributez
attribute-setz
call-templateÚchooserAÚcopyzcopy-ofzdecimal-formatr=Úfallbackzfor-eachÚifÚimportrÚkeyÚmessageznamespace-aliasÚnumberZ	otherwiseÚoutputÚparamzpreserve-spacezprocessing-instructionÚsortzstrip-spaceZ
stylesheetÚtemplater%Z	transformzvalue-ofÚvariableÚwhenz
with-paramccsdx^tj||ƒD]N\}}}tjd|ƒ}|tjkrP|rP|jdƒ|jkrP|t|fVq|||fVqWdS)Nz</?xsl:([^>]*)/?>?é)	rÚget_tokens_unprocessedr2Úmatchrr9ÚgroupÚEXTRA_KEYWORDSr)Úselfr%ÚindexÚtokenÚvalueÚmr&r&r'rZs
z XsltLexer.get_tokens_unprocessedcCst|ƒrd|krdSdS)Nz<xslgš™™™™™é?)r)r%r&r&r'r(szXsltLexer.analyse_textN)r)r*r+r,r-r/r0r1r]rZr(r&r&r&r'rîs



	c@sheZdZdZdZdgZdgZdgZej	Z
dZdedZd	e
fd
efgdejdfd
ejdfgdedfdedeeeeƒƒdfedƒgedƒdejdfdedejdfdededeeejeƒdfdedeedƒdfdedeejdƒdfdedeeeeƒƒdfdedeejd ƒdfed!ƒg	edƒd"ed#eeƒfd$ed%eeƒfd&e
d'fd(ed)fd*efed!ƒgd+e
fd,ed-eej eeƒej ƒfd.e
dfgd/e
fd0ej!d1fd2ej!fd3e
dfgd4e
fd5ej"dfd6ej"j#dfd7ej"j$dfd8edfd9edfged:efd.e
dfged:ejfd.e
dfgd+ejfd,ed-eej eeƒej ƒfd.e
dfgd;œZ%d<S)=rz5
    For Haml markup.

    .. versionadded:: 1.3
    ZHamlZhamlz*.hamlztext/x-hamlz(?: \|\n(?=.* \|)|.)z
(?:,\s*\n|ú)z[ \t]*\nz[ \t]*z	\.[\w:-]+r!z	\#[\w:-]+z[&!]?==Úplainz([&!]?[=~])(z*\n)r$Úcssz%[\w:-]+z!!!z*\nz#popz(/)(\[z*?\])(ú/zhtml-comment-blockz-#zhaml-comment-blockz(-)(ú:zfilter-blockz
eval-or-plainz\{(,\n|z)*?\}z\[z*?\]z\(zhtml-attributesz	/[ \t]*\nz#pop:2z[<>]{1,2}(?=[ \t=])z([^#\n]|#[^{\n]|(\\\\)*\\#\{)+z(#\{)(z*?)(\})z\nz\s+z[\w:-]+[ \t]*=zhtml-attribute-valuez[\w:-]+z\)z[ \t]+z\w+z@\w+z\$\w+z'(\\\\|\\[^\\]|[^'\\\n])*'z"(\\\\|\\[^\\]|[^"\\\n])*"ú+)r$rez
eval-or-plainÚcontentr!rdzhtml-attributeszhtml-attribute-valuezhtml-comment-blockzhaml-comment-blockzfilter-blockN)&r)r*r+r,r-r/r0r1r2r3r5Ú_dotZ
_comma_dotrrrÚClassÚFunctionrrrrrrr9Ú	Namespacer	ÚSpecialrr7Ú	Decoratorr
ÚInterpolr:ÚVariableÚInstanceÚGlobalr;r&r&r&r'rs|













c@sxeZdZdZdZdgZdgZdgZej	Z
dZdefde
fgd	ejd
fdejd
fgded
fdedeeeeƒƒdfed
ƒgedƒdejd
fdedejdfdededeeejeƒdfdedeedƒdfdedeejdƒdfdedeeeeeƒƒdfdedeeeeƒƒdfdedeejdƒdfed ƒg
edƒd!ed"eeƒfd#ed$eeƒfd%ed&fd'ed(fd)efed ƒgd*efd+ed,eej eeƒej ƒfd-edfgd.efd/ej!d0fd1ej!fd2edfgd3efd4ej"dfd5ej"j#dfd6ej"j$dfd7edfd8edfged9efd-edfged9ejfd-edfgd*ejfd+ed,eej eeƒej ƒfd-edfgd:œZ%d;S)<rzt
    For `Scaml markup <http://scalate.fusesource.org/>`_.  Scaml is Haml for Scala.

    .. versionadded:: 1.4
    ZScamlZscamlz*.scamlztext/x-scamlÚ.z[ \t]*\nz[ \t]*z	\.[\w:-]+r!z	\#[\w:-]+z[&!]?==rdz([&!]?[=~])(z*\n)r$rez%[\w:-]+z!!!z*\nz#popz(/)(\[z*?\])(rfzhtml-comment-blockz-#zscaml-comment-blockz(-@\s*)(import)?(z(-)(rgzfilter-blockz
eval-or-plainz\{(,\n|z)*?\}z\[z*?\]z\(zhtml-attributesz	/[ \t]*\nz#pop:2z[<>]{1,2}(?=[ \t=])z([^#\n]|#[^{\n]|(\\\\)*\\#\{)+z(#\{)(z*?)(\})z\nz\s+z[\w:-]+[ \t]*=zhtml-attribute-valuez[\w:-]+z\)z[ \t]+z\w+z@\w+z\$\w+z'(\\\\|\\[^\\]|[^'\\\n])*'z"(\\\\|\\[^\\]|[^"\\\n])*"rh)r$rez
eval-or-plainrir!rdzhtml-attributeszhtml-attribute-valuezhtml-comment-blockzscaml-comment-blockzfilter-blockN)&r)r*r+r,r-r/r0r1r2r3r5rjrrrrkrlrrrrrrr9rmr	rnrr7rror
rpr:rqrrrsr;r&r&r&r'r‚s€














c@s€eZdZdZdZddgZddgZddgZej	Z
d	Zd
efde
fgdejd
fdejd
fgdedfdedeeeeƒƒdfedƒgedƒdedejdfdededeeejeƒdfdedeedƒdfdedeejdƒdfdedeeeeeƒƒdfdedeeeeƒƒdfd edeejd!ƒdfd"ejd
fd#ed$fg
edƒd%ed&eeƒfd'ed(eeƒfd)ed*fd+ed,fd-efed$ƒgd.efd/ed0eej eeƒej ƒfd1edfgd2efd3ej!d4fd"ej!fd5edfgd6efd7ej"dfd8ej"j#dfd9ej"j$dfd:edfd;edfged<efd1edfged<ejfd1edfgd.ejfd/ed0eej eeƒej ƒfd1edfgd=œZ%d>S)?rz
    For Pug markup.
    Pug is a variant of Scaml, see:
    http://scalate.fusesource.org/documentation/scaml-reference.html

    .. versionadded:: 1.4
    ZPugZpugZjadez*.pugz*.jadez
text/x-pugztext/x-jadertz[ \t]*\nz[ \t]*z	\.[\w:-]+r!z	\#[\w:-]+z[&!]?==rdz([&!]?[=~])(z*\n)r$rez!!!z*\nz#popz(/)(\[z*?\])(rfzhtml-comment-blockz-#zscaml-comment-blockz(-@\s*)(import)?(z(-)(rgzfilter-blockz[\w:-]+z\|z
eval-or-plainz\{(,\n|z)*?\}z\[z*?\]z\(zhtml-attributesz	/[ \t]*\nz#pop:2z[<>]{1,2}(?=[ \t=])z([^#\n]|#[^{\n]|(\\\\)*\\#\{)+z(#\{)(z*?)(\})z\nz\s+z[\w:-]+[ \t]*=zhtml-attribute-valuez\)z[ \t]+z\w+z@\w+z\$\w+z'(\\\\|\\[^\\]|[^'\\\n])*'z"(\\\\|\\[^\\]|[^"\\\n])*"rh)r$rez
eval-or-plainrir!rdzhtml-attributeszhtml-attribute-valuezhtml-comment-blockzscaml-comment-blockzfilter-blockN)&r)r*r+r,r-r/r0r1r2r3r5rjrrrrkrlrrrrrrrmr	rnrr7rror9r
rpr:rqrrrsr;r&r&r&r'ròs~















)(r,r2Zpygments.lexerrrrrrrZpygments.tokenrr	r
rrr
rrZ
pygments.utilrrZpygments.lexers.javascriptrZpygments.lexers.jvmrZpygments.lexers.cssrrrZpygments.lexers.rubyrÚ__all__rrrrrrrZ	JadeLexerr&r&r&r'Ú<module>	s$ (
NX,%opk