mò 3Oc@s dZdZdkZdkZdkZdkZdkZdkZdefd„ƒYZ ei dfjode fd„ƒYZ ne Z de e fd „ƒYZ d e fd „ƒYZd efd „ƒYZdefd„ƒYZdfd„ƒYZdfd„ƒYZdfd„ƒYZdfd„ƒYZdfd„ƒYZdfd„ƒYZdefd„ƒYZdfd„ƒYZd fd!„ƒYZd"efd#„ƒYZd$efd%„ƒYZd&efd'„ƒYZd(efd)„ƒYZd*efd+„ƒYZd,fd-„ƒYZd.fd/„ƒYZ d0efd1„ƒYZ!d2efd3„ƒYZ"d4fd5„ƒYZ#d6eeefd7„ƒYZ$d8eeefd9„ƒYZ%d:eeefd;„ƒYZ&d<eefd=„ƒYZ'd>eefd?„ƒYZ(d@eefdA„ƒYZ)dBeefdC„ƒYZ*dDeefdE„ƒYZ+dFeefdG„ƒYZ,dHeefdI„ƒYZ-dJeefdK„ƒYZ.dLeefdM„ƒYZ/dNeefdO„ƒYZ0dPeefdQ„ƒYZ1dReefdS„ƒYZ2dTeefdU„ƒYZ3dVeefdW„ƒYZ4dXeefdY„ƒYZ5dZeefd[„ƒYZ6d\eefd]„ƒYZ7d^eefd_„ƒYZ8d`eefda„ƒYZ9dbeefdc„ƒYZ:ddeefde„ƒYZ;dfeefdg„ƒYZ<dheefdi„ƒYZ=djeefdk„ƒYZ>dleefdm„ƒYZ?dneefdo„ƒYZ@dpeefdq„ƒYZAdreefds„ƒYZBdteefdu„ƒYZCdveefdw„ƒYZDdxeefdy„ƒYZEdzeefd{„ƒYZFd|eefd}„ƒYZGd~eefd„ƒYZHd€eefd�„ƒYZId‚eefdƒ„ƒYZJd„eefd…„ƒYZKd†eefd‡„ƒYZLdˆeefd‰„ƒYZMdŠeefd‹„ƒYZNdŒeefd�„ƒYZOdŽeefd�„ƒYZPd�eefd‘„ƒYZQd’eefd“„ƒYZRd”eefd•„ƒYZSd–eefd—„ƒYZTd˜eefd™„ƒYZUdšeefd›„ƒYZVdœeefd�„ƒYZWdžeefdŸ„ƒYZXd eefd¡„ƒYZYd¢eefd£„ƒYZZd¤eefd¥„ƒYZ[d¦eefd§„ƒYZ\d¨eefd©„ƒYZ]dªeefd«„ƒYZ^d¬eefd­„ƒYZ_d®eefd¯„ƒYZ`d°eeefd±„ƒYZad²eeefd³„ƒYZbd´eee ee"fdµ„ƒYZcd¶eeee#e"fd·„ƒYZdd¸eeee#e"fd¹„ƒYZedºeefd»„ƒYZfd¼eefd½„ƒYZgd¾eefd¿„ƒYZhdÀeefdÁ„ƒYZidÂeefdăYZjdÄeefdÅ„ƒYZkdÆeefdÇ„ƒYZldÈeefdÉ„ƒYZmdÊeefdË„ƒYZndÌeefdÍ„ƒYZodÎeefdÏ„ƒYZpdÐeeeefdÑ„ƒYZqdÒeeefdÓ„ƒYZrdÔee eefdÕ„ƒYZsdÖe efdׄƒYZtdØe efdÙ„ƒYZudÚe efdÛ„ƒYZvdÜee e!efdÝ„ƒYZwdÞe e!efdß„ƒYZxdàe e!efdᄃYZydâe efd㄃YZzdäe efd儃YZ{dæe efd焃YZ|dèe efd鄃YZ}dêe efd넃YZ~dìe efd턃YZdîe efdYZ€dðee efdñ„ƒYZ�dòe efdó„ƒYZ‚dôe efdõ„ƒYZƒdöe efd÷„ƒYZ„døi…ƒZ†dùfdú„ƒYZ‡dûe‡fdü„ƒYZˆdýe‡fdþ„ƒYZ‰dÿ„ZŠd„Z‹d„ZŒd„Z�e�e†ƒde‰fd„ƒYZŽde�fd„ƒYZ�de�fd„ƒYZ‘d e�fd „ƒYZ’d e�fd „ƒYZ“d e�fd„ƒYZ”de�fd„ƒYZ•de�fd„ƒYZ–d„Z—ei˜dƒZ™ei˜dƒZšhdd<dd<dd<dd<dd<d d!<d"d#<d$d#<d%d&<d'd<d(d)<d*d+<d,d<d-d.<d/d0<d1d!<d2d!<d3d4<d5d6<d7d8<d9d6<d:d<d;d.<d<d!<d=d><d?d&<d@dA<dBd6<dCdD<dEd><dFdG<dHdI<dJd4g}|i|ƒx$|iD]}|i|iƒƒqW|S(s:Specialized traverse() that doesn't check for a condition.N(R2R5RR+RR6t _all_traverse(RR2R((RR8Æs  c CsÖ|o t}n|oX|oQ| oI|djo|iƒSqpt |t i t fƒo|i |ƒSqpnt |t i t fƒo|}|d„}ng} |o+|djp ||ƒo| i|ƒn|oVt|iƒoFxC|D]7} | i| idtdtdtdtd|ƒƒqõWn|p|o�|}x‡|iox|ii|ƒ}xJ|i|dD]7} | i| idtd|dtdtd|ƒƒqyW|pPqK|i}qKWn| S( s Return an iterable containing * self (if include_self is true) * all descendants in tree traversal order (if descend is true) * all siblings (if siblings is true) and their descendants (if also descend is true) * the siblings of the parent (if ascend is true) and their descendants (if also descend is true), and so on If `condition` is not None, the iterable contains only nodes for which ``condition(node)`` is true. If `condition` is a node class ``cls``, it is equivalent to a function consisting of ``return isinstance(node, cls)``. If ascend is true, assume siblings to be true as well. For example, given the following tree:: <--- emphasis.traverse() and <--- strong.traverse() are called. Foo Bar Baz Then list(emphasis.traverse()) equals :: [, , <#text: Foo>, <#text: Bar>] and list(strong.traverse(ascend=True)) equals :: [, <#text: Foo>, <#text: Bar>, , <#text: Baz>] cCs t||ƒS(N(R3tnodet node_class(R9R:((Rt conditionst include_selftdescendtsiblingstascendR;iN(R?RR>R<R=R;R RR8R3ttypest ClassTypettypeR7R:trR5tlenR+RR6ttraverseR R9Rtindextsibling( RR;R<R=R>R?R9RFR:RGRCR((RREÎsF$  !   c CsT|id|d|d|d|d|ƒ}y |dSWntj o dSnXdS(sä Return the first node in the iterable returned by traverse(), or None if the iterable is empty. Parameter list is the same as of traverse. Note that include_self defaults to 0, though. R;R<R=R>R?iN( RRER;R<R=R>R?titerablet IndexErrorR (RR;R<R=R>R?RH((Rt next_nodes   (i(R&t __module__t__doc__R RRRRRtsyst version_infoR RRRRRR,R0R7R8RR RERJ(((RR#s.       . + Kit reprunicodecBstZdZd„ZRS(sI A class that removes the initial u from unicode's repr. cCsti|ƒdS(Ni(Rt__repr__R(R((RRP0s(R&RKRLRP(((RRO+s tTextcBs²tZdZdZfZeidjoed„Zn ed„Zdd„Z dd„Z d „Z d „Z d „Z d „Zd „Zddd„Zed„Zed„ZRS(sÐ Instances are terminal nodes (leaves) containing text only; no child nodes or attributes. Initialize by passing a string to the constructor. Access the text itself with the `astext` method. s#texticCs0t|tƒotdƒ‚nti||ƒS(s7Prevent the rawsource argument from propagating to str.sexpecting str data, not bytesN(R3tdatatbytest TypeErrorROt__new__R4(R4RRt rawsource((RRUDscCsti||ƒS(s7Prevent the rawsource argument from propagating to str.N(RORUR4RR(R4RRRV((RRUJstcCs ||_dS(N(RVR(RRRRV((Rt__init__NsicCsL|}t|ƒ|jo||d d}nd|itt|ƒƒfS(Nis ...s<%s: %s>(RRRRDtmaxlenttagnametreprRO(RRYRR((Rt shortreprSscCs|iddƒS(NRYiD(RR\(R((RRPYscCs|it|ƒƒS(N(RtcreateTextNodeRR(RR((RR\scCs t|ƒS(N(ROR(R((Rtastext_scCs|it|ƒd|iƒS(NRV(RR%RORV(R((RRkscCs |iƒS(N(RR(R((RRnss icCsIg}||}x)|iƒD]}|i||dƒqWdi|ƒS(Ns RW(R2RRRt splitlinesRR5tjoin(RRRRR2((RRqs   cCs|iti||ƒƒS(N(RR%ROtrstriptchars(RRb((RRa}scCs|iti||ƒƒS(N(RR%ROtlstripRb(RRb((RRcs(i(R&RKRLRZR+RMRNR RURXR\RPRR^RRRRaRc(((RRQ6s"         tElementcBsätZdZd5ZeZdZdd„Zd „Zd „Z d „Z d „Z e i d6jo e Zned„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zed„Zd„Zd„Zed„Z eZ!eZd „Z"d!„Z#d"„Z$d#d$„Z%d%„Z&d&„Z'd'„Z(d(„Z)d)„Z*d*„Z+d+„Z,d,e i-d-„Z.d,e i-d.„Z/d/d,d0„Z0d1„Z1d2„Z2d3„Z3eed4„Z4RS(7s‰ `Element` is the superclass to all specific elements. Elements contain attributes and child nodes. Elements emulate dictionaries for attributes, indexing by attribute name (a string). To set the attribute 'att' to 'value', do:: element['att'] = 'value' There are two special attributes: 'ids' and 'names'. Both are lists of unique identifiers, and names serve as human interfaces to IDs. Names are case- and whitespace-normalized (see the fully_normalize_name() function), and IDs conform to the regular expression ``[a-z](-?[a-z0-9]+)*`` (see the make_id() function). Elements also emulate lists for child nodes (element nodes and/or text nodes), indexing by integer. To get the first child node, use:: element[0] Elements may be constructed using the ``+=`` operator. To add one new child node to element, do:: element += node This is equivalent to ``element.append(node)``. To add a list of multiple child nodes at once, use the same ``+=`` operator:: element += [node1, node2] This is equivalent to ``element.extend([node1, node2])``. tidstclassestnamestdupnamestbackrefss RWcOsÈ||_g|_|i|ƒh|_x|iD]}g|i|s; s<%s: %s>( RRRR+tcR\RDR%R&R`(RRRR{((RRP×s   (cCs?|do%d|iidi|dƒfSn d|iSdS(NRgs <%s "%s"...>s; s<%s...>(RR%R&R`RZ(R((RR\äs %cCsf|ioNd|iƒdig}|iD]}|t|ƒq*~ƒ|iƒfSn |iƒSdS(Nu%s%s%sRW( RR+tstarttagR`RvR{Rtendtagtemptytag(RRvR{((Rt __unicode__ës NicCsò|djo t}n|ig}x»|iƒD]­\}}|djo|i |ƒq0nt |t ƒoAg}|D]}|td|fƒqx~}di|ƒ}n t|ƒ}||ƒ}|i d||fƒq0Wddi|ƒS(Ns%sRpu%s=%su<%s>u (t quoteattrR tpseudo_quoteattrRRZtpartsRstnameRnR5R3RuRvRwRxtvaluesR`R(RR€RƒRnRvR‚RwR„((RR|÷s      .  cCs d|iS(Ns(RRZ(R((RR} sc CsLddi|igg}|iƒD]\}}|d||fq#~ƒS(Nu<%s/>u s%s="%s"(R`RRZRvRstnRw(RRvRwR…((RR~ scCs t|iƒS(N(RDRR+(R((Rt__len__scCs.t|tƒo||ijSn||ijS(N(R3tkeyt basestringRRjR+(RR‡((Rt __contains__scCs�t|tƒo|i|Snnt|tƒo|i|SnOt|tiƒo2|i djp t d‚|i|i |i !Sn td‚dS(Niscannot handle slice with stridesFelement index must be an integer, a slice, or an attribute name string(Ni(R3R‡RˆRRjtintR+R@t SliceTypetstepR tAssertionErrortstartR!RT(RR‡((Rt __getitem__scCsÇt|tƒo||it|ƒxk|dD]_}||ijoI|i||j o5|iid|ƒ}|djo||7}qjq q W|dp´xœ|dD]8}|i i t |ƒ}|o||ijoPq„q„Wd}xO| p||ijo6|i i |i i t|iƒ}|id7_qÉW|di|ƒn||i|<|S(NResDuplicate ID: "%s".RgRWi(R9RÀRReR#tseveretmsgtmsgnodeR RƒRãt id_prefixtmake_idtauto_id_prefixR‘RõR5(RR9RRƒRRÀ((Rtset_idìs( $    # cCs`xY|dD]M}||ijo|i|||||ƒq ||i|<||i||i|ƒ|ii|dgƒi|ƒ|i|ƒdS(NR(RRRRëR¢R5R(RR((Rtnote_footnote_ref€s  cCs|ii|ƒdS(N(RRòR5tcitation(RR$((Rt note_citation…scCs>|i|ƒ|ii|dgƒi|ƒ|i|ƒdS(NR(RRRRìR¢R5R(RR((Rtnote_citation_refˆs  cCs•t|ƒ}||ijoU|iid|d|ƒ}|djo||7}n|i|}t ||ƒn||i|<||i t|ƒÌstauthorscBstZRS(N(R&RK(((RR?Íst organizationcBstZRS(N(R&RK(((RR@ÎstaddresscBstZRS(N(R&RK(((RRAÏstcontactcBstZRS(N(R&RK(((RRBÐstversioncBstZRS(N(R&RK(((RRCÑstrevisioncBstZRS(N(R&RK(((RRDÒststatuscBstZRS(N(R&RK(((RREÓstdatecBstZRS(N(R&RK(((RRFÔst copyrightcBstZRS(N(R&RK(((RRGÕsRýcBstZd„Zd„ZRS(NcCsKt|iƒ pt|idtƒ o|idtƒƒn|idS(Ni(RDRR+R3theaderR£(R((Rt get_headerÞs)cCsHt|iƒ pt|idtƒ o|itƒƒn|idS(Niÿÿÿÿ(RDRR+R3tfooterR5(R((Rt get_footerãs)(R&RKRIRK(((RRýÜs RHcBstZRS(N(R&RK(((RRHésRJcBstZRS(N(R&RK(((RRJêstsectioncBstZRS(N(R&RK(((RRLñsttopiccBstZdZRS(sü Topics are terminal, "leaf" mini-sections, like block quotes with titles, or textual figures. A topic is just like a section, except that it has no subsections, and it doesn't have to conform to section placement rules. Topics are allowed wherever body elements (list, table, etc.) are allowed, but only at the top level of a section or document. Topics cannot nest inside topics, sidebars, or body elements; you can't have a topic inside a table, list, block quote, etc. (R&RKRL(((RRMôs tsidebarcBstZdZRS(sŸ Sidebars are like miniature, parallel documents that occur inside other documents, providing related or reference material. A sidebar is typically offset by a border and "floats" to the side of the page; the document's main text may flow around it. Sidebars can also be likened to super-footnotes; their content is outside of the flow of the document's main text. Sidebars are allowed wherever body elements (list, table, etc.) are allowed, but only at the top level of a section or document. Sidebars cannot nest inside sidebars, topics, or body elements; you can't have a sidebar inside a table, list, block quote, etc. (R&RKRL(((RRNs t transitioncBstZRS(N(R&RK(((RROst paragraphcBstZRS(N(R&RK(((RRPstcompoundcBstZRS(N(R&RK(((RRQst containercBstZRS(N(R&RK(((RRRst bullet_listcBstZRS(N(R&RK(((RRSstenumerated_listcBstZRS(N(R&RK(((RRTst list_itemcBstZRS(N(R&RK(((RRUstdefinition_listcBstZRS(N(R&RK(((RRV stdefinition_list_itemcBstZRS(N(R&RK(((RRW!sttermcBstZRS(N(R&RK(((RRX"st classifiercBstZRS(N(R&RK(((RRY#st definitioncBstZRS(N(R&RK(((RRZ$st field_listcBstZRS(N(R&RK(((RR[%stfieldcBstZRS(N(R&RK(((RR\&st field_namecBstZRS(N(R&RK(((RR]'st field_bodycBstZRS(N(R&RK(((RR^(stoptioncBstZdZRS(NRW(R&RKR˜(((RR_+stoption_argumentcBstZd„ZRS(NcCs|iddƒti|ƒS(Nt delimiterRp(RR�RÅR^(R((RR^2s(R&RKR^(((RR`0st option_groupcBstZdZRS(Ns, (R&RKR˜(((RRb6st option_listcBstZRS(N(R&RK(((RRc;stoption_list_itemcBstZdZRS(Ns (R&RKR˜(((RRd>st option_stringcBstZRS(N(R&RK(((RReCst descriptioncBstZRS(N(R&RK(((RRfDst literal_blockcBstZRS(N(R&RK(((RRgEst doctest_blockcBstZRS(N(R&RK(((RRhFst math_blockcBstZRS(N(R&RK(((RRiGst line_blockcBstZRS(N(R&RK(((RRjHsRcBstZdZRS(N(R&RKR R(((RRKst block_quotecBstZRS(N(R&RK(((RRkPst attributioncBstZRS(N(R&RK(((RRlQst attentioncBstZRS(N(R&RK(((RRmRstcautioncBstZRS(N(R&RK(((RRnSstdangercBstZRS(N(R&RK(((RRoTsR)cBstZRS(N(R&RK(((RR)Ust importantcBstZRS(N(R&RK(((RRpVstnotecBstZRS(N(R&RK(((RRqWsttipcBstZRS(N(R&RK(((RRrXsthintcBstZRS(N(R&RK(((RRsYstwarningcBstZRS(N(R&RK(((RRtZst admonitioncBstZRS(N(R&RK(((RRu[stcommentcBstZRS(N(R&RK(((RRv\stsubstitution_definitioncBstZRS(N(R&RK(((RRw]sRcBstZRS(N(R&RK(((RR^sRcBstZRS(N(R&RK(((RR_sR$cBstZRS(N(R&RK(((RR$`stlabelcBstZRS(N(R&RK(((RRxastfigurecBstZRS(N(R&RK(((RRybstcaptioncBstZRS(N(R&RK(((RRzcstlegendcBstZRS(N(R&RK(((RR{dsttablecBstZRS(N(R&RK(((RR|esttgroupcBstZRS(N(R&RK(((RR}fstcolspeccBstZRS(N(R&RK(((RR~gsttheadcBstZRS(N(R&RK(((RRhsttbodycBstZRS(N(R&RK(((RR€istrowcBstZRS(N(R&RK(((RR�jstentrycBstZRS(N(R&RK(((RR‚ksRcBs#tZdZed„Zd„ZRS(s‘ System message element. Do not instantiate this class directly; use ``document.reporter.info/warning/error/severe()`` instead. cOs^|o td|ƒ}|f|}nyti|d||ŽWnd|fGH‚nXdS(NRWssystem_message: children=%r(R4RPtpR+RdRXRRj(RR4R+RjRƒ((RRXws cCs>|iddƒ}d|d||d|dti|ƒfS(NRRWu%s:%s: (%s/%s) %sRRBR(RR�RRdR^(RR((RR^�s(R&RKRLR RXR^(((RRns  R1cBs5tZdZedd„Zddd„Zd„ZRS(sF The "pending" element is used to encapsulate a pending operation: the operation (transform), the point at which to apply it, and any data it requires. Only the pending operation's location within the document is stored in the public document tree (by the "pending" object itself); the operation and its data are stored in the "pending" object's internal instance attributes. For example, say you want a table of contents in your reStructuredText document. The easiest way to specify where to put it is from within the document, with a directive:: .. contents:: But the "contents" directive can't do its work until the entire document has been parsed and possibly transformed to some extent. So the directive code leaves a placeholder behind that will trigger the second phase of its processing, something like this:: + internal attributes Use `document.note_pending()` so that the `docutils.transforms.Transformer` stage of processing can run all pending transforms. RWcOs3ti||||Ž||_|ph|_dS(N(RdRXRRVR+Rjt transformtdetails(RR„R…RVR+Rj((RRX£s s ic Cs¶dd|ii|iifdg}|iiƒ}|iƒx,|D]$\}}t |t ƒoY|i dd|fƒ|i g}|iƒiƒD]} |dd| fq•~ƒqE|oŽt |tƒo~t |dt ƒoj|i dd|fƒxj|D]D}|i g}|iƒiƒD]} |dd| fq&~ƒqWqE|i dd||fƒqEWti|||ƒdig}|D]} |d ||| fq�~ƒS( Ns.. internal attributes:s .transform: %s.%ss .details:s%7s%s:RWs%9s%sis %7s%s: %rs %s%s (RR„RKR&t internalsR…RmRœR‡RnR3RR5R6RvRR_RRuRwRdRRR`( RRRR†RnRvR…R‡RwR((RR®s%  B+FcCs"|i|i|i|i|i�S(N(RR%R„R…RVRj(R((RRÇs(R&RKRLR RXRR(((RR1‡s  trawcBstZdZRS(s@ Raw data that is to be passed untouched to the Writer. (R&RKRL(((RR‡Ìs temphasiscBstZRS(N(R&RK(((RRˆÙststrongcBstZRS(N(R&RK(((RR‰ÚstliteralcBstZRS(N(R&RK(((RRŠÛst referencecBstZRS(N(R&RK(((RR‹Üstfootnote_referencecBstZRS(N(R&RK(((RRŒÝstcitation_referencecBstZRS(N(R&RK(((RR�Þstsubstitution_referencecBstZRS(N(R&RK(((RRŽßsttitle_referencecBstZRS(N(R&RK(((RR�àst abbreviationcBstZRS(N(R&RK(((RR�ástacronymcBstZRS(N(R&RK(((RR‘âst superscriptcBstZRS(N(R&RK(((RR’ãst subscriptcBstZRS(N(R&RK(((RR“ästmathcBstZRS(N(R&RK(((RR”åstimagecBstZd„ZRS(NcCs|iddƒS(NtaltRW(RR�(R((RR^ês(R&RKR^(((RR•èstinlinecBstZRS(N(R&RK(((RR—îst problematiccBstZRS(N(R&RK(((RR˜ïst generatedcBstZRS(N(R&RK(((RR™ðss< Text abbreviation acronym address admonition attention attribution author authors block_quote bullet_list caption caution citation citation_reference classifier colspec comment compound contact container copyright danger date decoration definition definition_list definition_list_item description docinfo doctest_block document emphasis entry enumerated_list error field field_body field_list field_name figure footer footnote footnote_reference generated header hint image important inline label legend line line_block list_item literal literal_block math math_block note option option_argument option_group option_list option_list_item option_string organization paragraph pending problematic raw reference revision row rubric section sidebar status strong subscript substitution_definition substitution_reference subtitle superscript system_message table target tbody term tgroup thead tip title title_reference topic transition version warningt NodeVisitorcBsAtZdZfZd„Zd„Zd„Zd„Zd„ZRS(sŠ "Visitor" pattern [GoF95]_ abstract superclass implementation for document tree traversals. Each node class has corresponding methods, doing nothing by default; override individual methods for specific and useful behaviour. The `dispatch_visit()` method is called by `Node.walk()` upon entering a node. `Node.walkabout()` also calls the `dispatch_departure()` method before exiting a node. The dispatch methods call "``visit_`` + node class name" or "``depart_`` + node class name", resp. This is a base class for visitors whose ``visit_...`` & ``depart_...`` methods should be implemented for *all* node types encountered (such as for `docutils.writers.Writer` subclasses). Unimplemented methods will raise exceptions. For sparse traversals, where only certain node types are of interest, subclass `SparseNodeVisitor` instead. When (mostly or entirely) uniform processing is desired, subclass `GenericNodeVisitor`. .. [GoF95] Gamma, Helm, Johnson, Vlissides. *Design Patterns: Elements of Reusable Object-Oriented Software*. Addison-Wesley, Reading, MA, USA, 1995. cCs ||_dS(N(RR(RR((RRX=scCsO|ii}t|d||iƒ}|ii i d|i|fƒ||ƒS(sª Call self."``visit_`` + node class name" with `node` as parameter. If the ``visit_...`` method does not exist, call self.unknown_visit. tvisit_s;docutils.nodes.NodeVisitor.dispatch_visit calling %s for %sN( R9R%R&t node_nameR¾Rt unknown_visittmethodRR#R$(RR9RžRœ((RR'@s   cCsO|ii}t|d||iƒ}|ii i d|i|fƒ||ƒS(s° Call self."``depart_`` + node class name" with `node` as parameter. If the ``depart_...`` method does not exist, call self.unknown_departure. tdepart_s?docutils.nodes.NodeVisitor.dispatch_departure calling %s for %sN( R9R%R&RœR¾Rtunknown_departureRžRR#R$(RR9RžRœ((RR1Ms   cCsM|iiip|ii|ijo#td|i|iifƒ‚ndS(sk Called when entering unknown `Node` types. Raise an exception unless overridden. s!%s visiting unknown node type: %sN( RRRãtstrict_visitorR9R%R&toptionalR(RR9((RR�Zs&cCsM|iiip|ii|ijo#td|i|iifƒ‚ndS(si Called before exiting unknown `Node` types. Raise exception unless overridden. s"%s departing unknown node type: %sN( RRRãR¡R9R%R&R¢R(RR9((RR fs&( R&RKRLR¢RXR'R1R�R (((RRšs   tSparseNodeVisitorcBstZdZRS(s Base class for sparse traversals, where only certain node types are of interest. When ``visit_...`` & ``depart_...`` methods should be implemented for *all* node types (such as for `docutils.writers.Writer` subclasses), subclass `NodeVisitor` instead. (R&RKRL(((RR£ss tGenericNodeVisitorcBs tZdZd„Zd„ZRS(s˜ Generic "Visitor" abstract superclass, for simple traversals. Unless overridden, each ``visit_...`` method calls `default_visit()`, and each ``depart_...`` method (when using `Node.walkabout()`) calls `default_departure()`. `default_visit()` (and `default_departure()`) must be overridden in subclasses. Define fully generic visitors by overriding `default_visit()` (and `default_departure()`) only. Define semi-generic visitors by overriding individual ``visit_...()`` (and ``depart_...()``) methods also. `NodeVisitor.unknown_visit()` (`NodeVisitor.unknown_departure()`) should be overridden for default behavior. cCs t‚dS(s)Override for generic, uniform traversals.N(R(RR9((Rt default_visit�scCs t‚dS(s)Override for generic, uniform traversals.N(R(RR9((Rtdefault_departure“s(R&RKRLR¥R¦(((RR¤}s  cCs|i|ƒdS(N(RR¥R9(RR9((Rt_call_default_visit—scCs|i|ƒdS(N(RR¦R9(RR9((Rt_call_default_departurešscCsdS(N((RR9((Rt_nop�scCsex^|D]V}ttd|tƒttd|tƒttd|tƒttd|tƒqWdS(s%Save typing with dynamic assignments:R›RŸN(Rgt_nametsetattrR¤R§R¨R£R©(RgRª((Rt_add_node_class_names stTreeCopyVisitorcBs2tZdZd„Zd„Zd„Zd„ZRS(sQ Make a complete copy of a tree or branch, including element attributes. cCs&ti||ƒg|_g|_dS(N(R¤RXRRt parent_stackR(RR((RRX±s cCs |idS(Ni(RR(R((Rt get_tree_copy¶scCs<|iƒ}|ii|ƒ|ii|iƒ||_dS(s9Copy the current node, and make it the new acting parent.N(R9RtnewnodeRRR5R®(RR9R°((RR¥¹s  cCs|iiƒ|_dS(s#Restore the previous acting parent.N(RR®R¤R(RR9((RR¦Às(R&RKRLRXR¯R¥R¦(((RR­«s    tTreePruningExceptioncBstZdZRS(s÷ Base class for `NodeVisitor`-related tree pruning exceptions. Raise subclasses from within ``visit_...`` or ``depart_...`` methods called from `Node.walk()` and `Node.walkabout()` tree traversals to prune the tree traversed. (R&RKRL(((RR±Ås R(cBstZdZRS(s… Do not visit any children of the current node. The current node's siblings and ``depart_...`` method are not affected. (R&RKRL(((RR(Òs R-cBstZdZRS(s� Do not visit any more siblings (to the right) of the current node. The current node's children and its ``depart_...`` method are not affected. (R&RKRL(((RR-Üs R)cBstZdZRS(sq Do not visit the current node's children, and do not call the current node's ``depart_...`` method. (R&RKRL(((RR)æs R*cBstZdZRS(s Do not call the current node's ``depart_...`` method. The current node's children and siblings are not affected. (R&RKRL(((RR*ðs t NodeFoundcBstZdZRS(s¥ Raise to indicate that the target of a search has been found. This exception must be caught by the client; it is not caught by the traversal code. (R&RKRL(((RR²ús R.cBstZdZRS(s= Stop the traversal alltogether. The current node's ``depart_...`` method is not affected. The parent nodes ``depart_...`` methods are also called as usual. No other nodes are visited. This is an alternative to NodeFound that does not cause exception handling to trickle up to the caller. (R&RKRL(((RR.s cCs®|iƒ}t|tƒp|iƒ}n|itƒ}|itƒ}t i d|ƒi ddƒidƒ}t i ddi|iƒƒƒ}ti d|ƒ}t|ƒS(sû Convert `string` into an identifier and return it. Docutils identifiers will conform to the regular expression ``[a-z](-?[a-z0-9]+)*``. For CSS compatibility, identifiers (the "class" and "id" attributes) should have no underscores, colons, or periods. Hyphens may be used. - The `HTML 4.01 spec`_ defines identifiers based on SGML tokens: ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). - However the `CSS1 spec`_ defines identifiers based on the "name" token, a tighter interpretation ("flex" tokenizer notation; "latin1" and "escape" 8-bit characters have been replaced with entities):: unicode \[0-9a-f]{1,4} latin1 [¡-ÿ] escape {unicode}|\[ -~¡-ÿ] nmchar [-a-z0-9]|{latin1}|{escape} name {nmchar}+ The CSS1 "nmchar" rule does not include underscores ("_"), colons (":"), or periods ("."), therefore "class" and "id" attributes should not contain these characters. They should be replaced with hyphens ("-"). Combined with HTML's requirements (the first character must be a letter; no "unicode", "latin1", or "escape" characters), this results in the ``[a-z](-?[a-z0-9]+)*`` pattern. .. _HTML 4.01 spec: http://www.w3.org/TR/html401 .. _CSS1 spec: http://www.w3.org/TR/REC-CSS1 tNFKDtasciitignoret-RpRWN(tstringRoRÀR3Rtdecodet translatet_non_id_translate_digraphst_non_id_translatet unicodedatat normalizeRt _non_id_charstsubR`tsplitt_non_id_at_endsR‘(R·RÀ((RRs" '!s [^a-z0-9]+s ^[-0-9]+|-+$iøuoiudi'uhi1uiiBuliguti€ubiƒiˆuciŒi’ufi™ukišižuni¥upi«i­i´uyi¶uziåugi%i4i5i6i7uji<i?usi@iGueiIiKuqiMuriOißusziæuaeiSuoei8udbi9uqpcCs/|di|ƒ|di|ƒd|_dS(NRhRgi(R9R5RƒR¦R½(R9Rƒ((RRpscCsdi|iƒiƒƒS(s.Return a case- and whitespace-normalized name.RpN(R`RƒRoRÀ(Rƒ((RR,wscCsdi|iƒƒS(s$Return a whitespace-normalized name.RpN(R`RƒRÀ(Rƒ((RR'{scCs|iddƒiddƒS(sDEscape string values that are elements of a list, for serialization.s\s\\Rps\ N(RnR¬(Rn((RRxscCsd|S(sQuote attributes for pseudo-xmls"%s"N(Rn(Rn((RR�ƒs(¢RLt __docformat__RMtostreR·R@R¼tobjectRRNRRORQRdRÅRÈRÊRÌRÏRÐRÑRÒRÓRÔRÕRÖR×RØRÙRÚRÛRÜRÝRÞRàRR:R;R<R=R>R?R@RARBRCRDRERFRGRýRHRJRLRMRNRORPRQRRRSRTRURVRWRXRYRZR[R\R]R^R_R`RbRcRdReRfRgRhRiRjRRkRlRmRnRoR)RpRqRrRsRtRuRvRwRRR$RxRyRzR{R|R}R~RR€R�R‚RR1R‡RˆR‰RŠR‹RŒR�RŽR�R�R‘R’R“R”R•R—R˜R™RÀtnode_class_namesRšR£R¤R§R¨R©R¬R­t ExceptionR±R(R-R)R*R²R.RtcompileR¾RÁR»RºRR,R'RxR�(›RWROR~RsR�R×R<R²RNR[R�RÕRGR:RCR1R-R.RlRRÞRÆRàR)RQRÜRjRXRbR­R^RDRYRTR‹RuR`RÝRiRRRRLRUR'RxRÄRÛRŒR�R“R�R»R”R—RSRmR*RAR‰R{RZR¨ReRRORØRÊRŽRÃRvRÁR;RoR˜R•RÂRHR|RRyRÈRŠRRhR_R©R?RR]RMR¼RRQR‘RÖRcRPRgR)RkRÙR�R§RxRÐRR¤R$RºRýR‡RtRnR¾RÌR±R}RÒR>RrR€RqR\RˆR£RÚRšR¬RRwRÔRERfR·RVRdRMR™RpR,R‚RFRzRÏR=R@RÓRÑRJRÅR(RBR@RdR’((Rt?sF      ÿLÿ�   ÿJ """E  ]             1ÿ0#3