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/wiki/__pycache__/ |
Upload File : |
o �k�`x� � @ s� d dl mZ d dlmZ d dl Z d dlZd dlZd dlZd dlZd dlT d dl m Z mZmZm Z mZ d dlmZ d dlmZmZmZ d dlmZmZmZmZ d d lmZ d d lmZmZmZ d dl m!Z!m"Z"m#Z#m$Z$ d dl%m&Z& d d l'm(Z(m)Z)m*Z* d dl+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2 d dl3m4Z4 G dd� de5�Z6G dd� de6�Z7G dd� de6�Z8G dd� de6�Z9G dd� de6�Z:G dd� de6�Z;G dd� de6�Z<G dd� de6�Z=G d d!� d!e6�Z>d$d"d#�Z?dS )%� ��fnmatchcase)�groupbyN)�*)�Resource�ResourceNotFound�get_resource_name�get_resource_summary�get_resource_url)�as_int)�format_date�from_utimestamp� user_time)�Markup�escape�find_element�tag)� separated)� unicode_quote� to_unicode�stripws)�_�dgettext� cleandoc_�tag_)�chrome_resource_path)�IWikiMacroProvider� WikiSystem� parse_args)� MacroError�OutlineFormatter�ProcessorError�extract_link�format_to_html�format_to_oneliner�system_message)�InterWikiMapc @ sJ e Zd ZdZee� dZdZdZdZ dd� Z dd� Zd d � Zd dd�Z dS )� WikiMacroBasea Abstract base class for wiki macros and processors. On usage error, the `MacroError` or `ProcessorError` exception should be raised, to ensure proper display of the error message in the rendered wiki content. The `_description` attribute contains the macro help. Set the `hide_from_macro_index` attribute to `True` to prevent displaying help in the macro index (`[[MacroList]]`). If the default value of `False` and the `_description` is empty, "No documentation found" will be displayed. TNFc c s* � | j j}|�d�r|dd� }|V dS )z4Yield the name of the macro based on the class name.�MacroN���)� __class__�__name__�endswith)�self�name� r/ �2/usr/lib/python3/dist-packages/trac/wiki/macros.py� get_macrosI s � zWikiMacroBase.get_macrosc C sB | j rdS | j| j}}|r|r||fS |S | jrt�| j�S dS )z:Return the subclass's gettext domain and macro descriptionN� )�hide_from_macro_index�_domain�_description�__doc__�inspect�cleandoc)r- r. �domain�descriptionr/ r/ r0 �get_macro_descriptionP s z#WikiMacroBase.get_macro_descriptionc C s t ��N)�NotImplementedError)r- �parserr. �contentr/ r/ r0 �parse_macro\ s zWikiMacroBase.parse_macroc C s t d|| jf ��)Nz9pre-0.11 Wiki macro %s by provider %s no longer supported)r= r* )r- � formatterr. r? �argsr/ r/ r0 �expand_macro_ s ��zWikiMacroBase.expand_macror<