I?NWh ( d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl
Z
ddlZddlmZm
Z
mZmZmZ ddlmZ ddlmZ ddlmZ dd lmZmZmZmZmZ G d
dej Z G d d
ej Z G d dej Z!dS )z,common definitions for Docutils HTML writers N)unquote)url2pathname)frontend languagesnodesutilswriters) length_or_percentage_or_unitless)PIL)
writer_aux)unichar2texpick_math_environment math2htmllatex2mathmltex2mathml_externc e Zd ZdZ ddddgddifdd gd
dej dfd
dgddej dfddgdej dfddgddej dfddgdddfdd gd! d"d#d$fd%d&gd'd(gd(d)d*d+fd,d-gg d.d/d)d$fd0d1gd2dej dfd3d4gd5ddfd6d7gd2dej dfd8d9gd:ddfd;difd?d@gd=dAifdBdCgdDdej dfdEdFgdGddfdHdIgdej dJfffZdKdLiZ dMZ
dNZdOZ fdPZ
dQ ZdR ZdS ZdT Z xZS )UWriter)htmlxhtmlzHTML Writer OptionsNzFSpecify the template file (UTF-8 encoded). (default: writer dependent)z
--templatemetavarzzhComma separated list of stylesheet URLs. Overrides previous --stylesheet and --stylesheet-path settings.z--stylesheetzstylesheet_path)r overrides validatorzComma separated list of stylesheet paths. Relative paths are expanded if a matching file is found in the --stylesheet-dirs. With --link-stylesheet, the path is rewritten relative to the output HTML file. (default: writer dependent)z--stylesheet-pathz
stylesheetzComma-separated list of directories where stylesheets are found. Used by --stylesheet-path when expanding relative path arguments. (default: writer dependent)z--stylesheet-dirsz)r r zvEmbed the stylesheet(s) in the output HTML file. The stylesheet files must be accessible during processing. (default)z--embed-stylesheet
store_true)defaultactionr z3Link to the stylesheet(s) in the output HTML file. z--link-stylesheetembed_stylesheetstore_false)destr z}Specify the initial header level. Does not affect document title & subtitle (see --no-doc-title).(default: writer dependent).z--initial-header-levelz1 2 3 4 5 62z)choicesr r zYFormat for footnote references: one of "superscript" or "brackets". (default: "brackets")z--footnote-referencessuperscriptbracketsztrim_footnote_reference_space)r# r r r zyFormat for block quote attributions: one of "dash" (em-dash prefix), "parentheses"/"parens", or "none". (default: "dash")z
--attributiondashparenthesesparensnoner( zgRemove extra vertical whitespace between items of "simple" bullet lists and enumerated lists. (default)z--compact-listsTz3Disable compact simple bullet and enumerated lists.z--no-compact-lists
compact_listszORemove extra vertical whitespace between items of simple field lists. (default)z--compact-field-listsz#Disable compact simple field lists.z--no-compact-field-listscompact_field_listszAdded to standard table classes. Defined styles: borderless, booktabs, align-left, align-center, align-right, colwidths-auto, colwidths-grid.z
--table-styler zmMath output format (one of "MathML", "HTML", "MathJax", or "LaTeX") and option(s). (default: "HTML math.css")z
--math-outputz
HTML math.csszPrepend an XML declaration. z--xml-declarationFzOmit the XML declaration.z--no-xml-declarationxml_declarationzyObfuscate email addresses to confuse harvesters while still keeping email links usable with standards-compliant browsers.z--cloak-email-addresses)r r output_encoding_error_handlerxmlcharrefreplacezhtml base writer)r zhtml writers)head_prefixheadr body_prefixbody_pre_docinfodocinfobodybody_suffixtitlesubtitleheaderfootermetafragmenthtml_prolog html_head
html_title
html_subtitle html_bodyc ` t t j gz S N)superget_transformsr Admonitions)self __class__s {/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/docutils/writers/_html_base.pyrG zWriter.get_transforms s$ ww%%'':+A*BBB c | | j x| _ }| j | | j D ]!}t | |t
|| "| | _ d S rE ) translator_classdocumentvisitor walkaboutvisitor_attributessetattrgetattrapply_templateoutput)rI rP attrs rK translatezWriter.translate s| !%!6!6t}!E!EEw
(((+ 8 8DD$ 6 67777))++rL c t | j j j d 5 }| }d d d n# 1 swxY w Y | }||z S )Nutf-8encoding)openrO settingstemplatereadinterpolation_dict)rI fpr_ subss rK rU zWriter.apply_template s
$-(1G
D
D
D !wwyyH ! ! ! ! ! ! ! ! ! ! ! ! ! ! !&&(($s AA Ac i }| j j }| j D ];}d t | | d ||<