o k`M$ @ s" d dl Z d dlZd dlZd dlmZ d dlmZ d dlZd dlmZ d dl m Z mZ d dlm Z mZ d dlmZ d dlT d d lmZmZmZ d d lmZmZ d dlmZ d dlmZmZ d d lmZm Z d dl!m"Z" d dl#m$Z$ d dl%m&Z&m'Z' d dl(m)Z)m*Z*m+Z+m,Z, dgZ-G dd de.Z/dS ) N)datetimeresource_filename) HtmlFormatter)get_all_lexersget_lexer_by_name)get_all_stylesget_style_by_name)ISystemInfoProvider)*) ConfigSection ListOptionOption)IHTMLPreviewRendererMimeview)IPreferencePanelProvider)get_pkginfolazy) http_datelocaltz)Markup_)IRequestHandlerHTTPNotFound)ITemplateProvider add_noticeadd_script_dataadd_stylesheetPygmentsRendererc @ s e Zd ZdZeeeeee dZ eddddidZe dd d dZeddd ddZdZdZdZdZdd Zdd Zdd Zd2ddZdd Zdd Zd d! Zd"d# Zd$d% Zd&d' Zed(d) Z ed*d+ Z!ed,d- Z"d3d.d/Z#d0d1 Z$dS )4r z8HTML renderer for syntax highlighting based on Pygments.Fzpygments-lexera Configure Pygments [%(url)s lexer] options. For example, to set the [%(url)s#lexers-for-php-and-related-languages PhpLexer] options `startinline` and `funcnamehighlighting`: {{{#!ini [pygments-lexer] php.startinline = True php.funcnamehighlighting = True }}} The lexer name is derived from the class name, with `Lexer` stripped from the end. The lexer //short names// can also be used in place of the lexer name. urlz http://pygments.org/docs/lexers/)doc_args mimeviewerpygments_default_styletracz:The default style to use for Pygments syntax highlighting.pygments_modes a List of additional MIME types known by Pygments. For each, a tuple `mimetype:mode:quality` has to be specified, where `mimetype` is the MIME type, `mode` is the corresponding Pygments mode to be used for the conversion and `quality` is the quality ratio associated to this conversion. That can also be used to override the default quality ratio used by the Pygments render.)docT z