Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/trac/mimeview/__pycache__/ |
Upload File : |
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)�datetime��resource_filename)� HtmlFormatter)�get_all_lexers�get_lexer_by_name)�get_all_styles�get_style_by_name)�ISystemInfoProvider)�*)� ConfigSection� ListOption�Option)�IHTMLPreviewRenderer�Mimeview)�IPreferencePanelProvider)�get_pkginfo�lazy)� http_date�localtz)�Markup��_)�IRequestHandler�HTTPNotFound)�ITemplateProvider� add_notice�add_script_data�add_stylesheet�PygmentsRendererc @ s� e Zd ZdZeeeeee � dZ eddddid�Ze dd d d�Zeddd dd�ZdZdZdZdZdd� Zdd� Zdd� Zd2dd�Zdd� 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� mimeviewer�pygments_default_style�tracz: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�<!DOCTYPE html> <html lang="en"> <head> <title>Hello, world!</title> <script> jQuery(function($) { $("h1").fadeIn("slow"); }); </script> </head> <body> <h1>Hello, world!</h1> </body> </html>c c s � dt t��d�fV d S )N�Pygments�version)r �pygments�get��self� r/ �8/usr/lib/python3/dist-packages/trac/mimeview/pygments.py�get_system_infog s �z PygmentsRenderer.get_system_infoc c s. � t � D ]\}}}}|D ]}||fV qqd S �N�r )r. r �aliases� mimetypes�mimetyper/ r/ r0 �get_extra_mimetypesl s ���z$PygmentsRenderer.get_extra_mimetypesc C s&