mς uυOc@shdZdZdklZlZlZdefd„ƒYZdfd„ƒYZdefd„ƒYZd S( s¨ This package contains modules for standard tree transforms available to Docutils components. Tree transforms serve a variety of purposes: - To tie up certain syntax-specific "loose ends" that remain after the initial parsing of the input plaintext. These transforms are used to supplement a limited syntax. - To automate the internal linking of the document tree (hyperlink references, footnote references, etc.). - To extract useful information from the document tree. These transforms may be used to construct (for example) indexes and tables of contents. Each transform is an optional step that a Docutils component may choose to perform on the parsed document. treStructuredText(s languagessApplicationErrors TransformSpectTransformErrorcBstZRS(N(t__name__t __module__(((tv/home/project-web/docutils/web-update/infrastructure/update-dir/aux/snapshots/docutils/docutils/transforms/__init__.pyRst TransformcBs)tZdZeZed„Zd„ZRS(s; Docutils transform component abstract base class. cCs4||_||_ti|ii|iƒ|_dS(sA Initial setup for in-place document transforms. N( tdocumenttselft startnodet languagest get_languagetsettingst language_codetreportertlanguage(RRR((Rt__init__*s   cKstdƒ‚dS(s5Override to apply the transform to the document tree.s"subclass must override this methodN(tNotImplementedError(Rtkwargs((Rtapply;s(RRt__doc__tNonetdefault_priorityRR(((RR!s  t TransformercBsStZdZd„Zed„Zd„Zed„Zd„Zd„Z d„Z RS(s‘ Stores transforms (`Transform` classes) and applies them to document trees. Also keeps track of components by component type name. cCsCg|_g|_||_g|_d|_h|_d|_dS(Ni(Rt transformstunknown_reference_resolversRtappliedtsortedt componentstserialno(RR((RRGs      cKsR|djo |i}n|i|ƒ}|ii||d|fƒd|_ dS(s+ Store a single transform. Use `priority` to override the default. `kwargs` is a dictionary whose contents are passed as keyword arguments to the `apply` method of the transform. This can be used to pass application-specific data to the transform instance. iN( tpriorityRttransform_classRRtget_priority_stringtpriority_stringRtappendRR(RRRRR ((Rt add_transform`s   cCsLx<|D]4}|i|iƒ}|ii||dhfƒqWd|_ dS(s3Store multiple transforms, with default priorities.iN( ttransform_listRRRRR RR!RR(RR#RR ((Rtadd_transformsns  cCs[|i}|djo |i}n|i|ƒ}|i i |||hfƒd|_ dS(s4Store a transform with an associated `pending` node.iN( tpendingt transformRRRRRRR RR!R(RR%RR R((Rt add_pendingws   cCs |id7_d||ifS(s” Return a string, `priority` combined with `self.serialno`. This ensures FIFO order on transforms with identical priority. is %03d-%03dN(RRR(RR((RRscCsίxE|D]=}|djoqn|i|iƒƒ||i|i