3 ��XEK � @ s" d Z ddlZddlmZmZmZmZmZmZ ddl m Z mZmZm Z mZmZmZ ddlmZmZ ddlmZ ddlmZ ddlmZmZmZ dd lmZ d ddd dddgZG dd � d e�ZG dd� de�Z G dd� de�Z!G dd � d e!�Z"G dd� de�Z#G dd� de�Z$G dd� de�Z%e%Z&dS )z� pygments.lexers.html ~~~~~~~~~~~~~~~~~~~~ Lexers for HTML, XML and related markup. :copyright: Copyright 2006-2017 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)�looks_like_xml�html_doctype_matches)�JavascriptLexer)� ScalaLexer)�CssLexer�_indentation� _starts_block)� RubyLexer� HtmlLexer�DtdLexer�XmlLexer� XsltLexer� HamlLexer� ScamlLexer�PugLexerc @ sx e Zd ZdZdZdgZddddgZdd gZej ej B Zd efde jfdejfd edfdejfdejfdeeee je�d,fdeeee je�d-fdeeee j�dfdeeeeee jee�fg defdedfdefgdefdee jee�dfde jfd eeee�dfgd!eeeeee jee�dfd"ee�fgd#eeeeee jee�dfd$ee�fgd%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. ZHTMLZhtmlz*.htmlz*.htmz*.xhtmlz*.xsltz text/htmlzapplication/xhtml+xmlz[^<&]+z&\S*?;z\<\!\[CDATA\[.*?\]\]\>z<!--�commentz <\?.*?\?>z<![^>]*>z(<)(\s*)(script)(\s*)�script-content�tagz(<)(\s*)(style)(\s*)� style-contentz(<)(\s*)([\w:.-]+)z"(<)(\s*)(/)(\s*)([\w:.-]+)(\s*)(>)z[^-]+z-->z#pop�-z\s+z([\w:-]+\s*)(=)(\s*)�attrz[\w:-]+z(/?)(\s*)(>)z (<)(\s*)(/)(\s*)(script)(\s*)(>)z.+?(?=<\s*/\s*script\s*>)z(<)(\s*)(/)(\s*)(style)(\s*)(>)z.+?(?=<\s*/\s*style\s*>)z".*?"z'.*?'z[^\s>]+)�rootr r zscript-contentz style-contentr# c C s t | �rdS d S )Ng �?)r )�text� r&