mò JOc@súdZdZdkZdkZy dkZWn"ej odkiiZnXdkl Z l Z dk l Z l Z lZlZdk lZlZdklZlZdklZdklZdkZ d klZlZlZlZd klZd k l!Z!l"Z"l#Z#d k l$Z$d efd„ƒYZ%defd„ƒYZ&defd„ƒYZ'defd„ƒYZ(de)fd„ƒYZ*dfd„ƒYZ+defd„ƒYZ,defd„ƒYZ-defd„ƒYZ.e/d„Z0d fd!„ƒYZ1e2d"ƒd#d$„Z3e2d%ƒd#d&„Z4d'„Z5d(e.fd)„ƒYZ6d*e6fd+„ƒYZ7d,e6fd-„ƒYZ8d.e8fd/„ƒYZ9d0e8fd1„ƒYZ:d2e8fd3„ƒYZ;d4e8fd5„ƒYZ<d6e8fd7„ƒYZ=d8e8e7fd9„ƒYZ>d:e<fd;„ƒYZ?d<e8fd=„ƒYZ@d>e8fd?„ƒYZAd@e6fdA„ƒYZBdBe.fdC„ƒYZCdDeCfdE„ƒYZDdFeDfdG„ƒYZEdHeDfdI„ƒYZFdJe.fdK„ƒYZGe6e9e:e;e<e=e@e?eAeCeEeFeBe7e>fZHdS(Lsà This is the ``docutils.parsers.rst.states`` module, the core of the reStructuredText parser. It defines the following: :Classes: - `RSTStateMachine`: reStructuredText parser's entry point. - `NestedStateMachine`: recursive StateMachine. - `RSTState`: reStructuredText State superclass. - `Inliner`: For parsing inline markup. - `Body`: Generic classifier of the first line of a block. - `SpecializedBody`: Superclass for compound element members. - `BulletList`: Second and subsequent bullet_list list_items - `DefinitionList`: Second+ definition_list_items. - `EnumeratedList`: Second+ enumerated_list list_items. - `FieldList`: Second+ fields. - `OptionList`: Second+ option_list_items. - `RFC2822List`: Second+ RFC2822-style fields. - `ExtensionOptions`: Parses directive option fields. - `Explicit`: Second+ explicit markup constructs. - `SubstitutionDef`: For embedded directives in substitution definitions. - `Text`: Classifier of second line of a text block. - `SpecializedText`: Superclass for continuation lines of Text-variants. - `Definition`: Second line of potential definition_list_item. - `Line`: Second line of overlined section title or transition marker. - `Struct`: An auxiliary collection class. :Exception classes: - `MarkupError` - `ParserError` - `MarkupMismatch` :Functions: - `escape2null()`: Return a string, escape-backslashes converted to nulls. - `unescape()`: Return a string, nulls removed or restored to backslashes. :Attributes: - `state_classes`: set of State classes used with `RSTStateMachine`. Parser Overview =============== The reStructuredText parser is implemented as a recursive state machine, examining its input one line at a time. To understand how the parser works, please first become familiar with the `docutils.statemachine` module. In the description below, references are made to classes defined in this module; please see the individual classes for details. Parsing proceeds as follows: 1. The state machine examines each line of input, checking each of the transition patterns of the state `Body`, in order, looking for a match. The implicit transitions (blank lines and indentation) are checked before any others. The 'text' transition is a catch-all (matches anything). 2. The method associated with the matched transition pattern is called. A. Some transition methods are self-contained, appending elements to the document tree (`Body.doctest` parses a doctest block). The parser's current line index is advanced to the end of the element, and parsing continues with step 1. B. Other transition methods trigger the creation of a nested state machine, whose job is to parse a compound construct ('indent' does a block quote, 'bullet' does a bullet list, 'overline' does a section [first checking for a valid section header], etc.). - In the case of lists and explicit markup, a one-off state machine is created and run to parse contents of the first item. - A new state machine is created and its initial state is set to the appropriate specialized state (`BulletList` in the case of the 'bullet' transition; see `SpecializedBody` for more detail). This state machine is run to parse the compound element (or series of explicit markup elements), and returns as soon as a non-member element is encountered. For example, the `BulletList` state machine ends as soon as it encounters an element which is not a list item of that bullet list. The optional omission of inter-element blank lines is enabled by this nested state machine. - The current line index is advanced to the end of the elements parsed, and parsing continues with step 1. C. The result of the 'text' transition depends on the next line of text. The current state is changed to `Text`, under which the second line is examined. If the second line is: - Indented: The element is a definition list item, and parsing proceeds similarly to step 2.B, using the `DefinitionList` state. - A line of uniform punctuation characters: The element is a section header; again, parsing proceeds as in step 2.B, and `Body` is still used. - Anything else: The element is a paragraph, which is examined for inline markup and appended to the parent element. Processing continues with step 1. treStructuredTextN(s FunctionTypes MethodType(snodess statemachinesutilss urischemes(sApplicationErrors DataError(sStateMachineWSsStateWS(sfully_normalize_name(swhitespace_normalize_name(s directivess languagess tableparsersroles(sen(s escape2nullsunescapes column_width(spunctuation_charst MarkupErrorcBstZRS(N(t__name__t __module__(((tu/home/project-web/docutils/web-update/infrastructure/update-dir/aux/snapshots/docutils/docutils/parsers/rst/states.pyR}stUnknownInterpretedRoleErrorcBstZRS(N(RR(((RR~st"InterpretedRoleNotImplementedErrorcBstZRS(N(RR(((RRst ParserErrorcBstZRS(N(RR(((RR€stMarkupMismatchcBstZRS(N(RR(((RR�stStructcBstZdZd„ZRS(s3Stores data attributes for dotted-attribute access.cKs|ii|ƒdS(N(tselft__dict__tupdatet keywordargs(R R ((Rt__init__ˆs(RRt__doc__R(((RR „s tRSTStateMachinecBs tZdZdeed„ZRS(sy reStructuredText's master StateMachine. The entry point to reStructuredText parsing is the `run()` method. icCsti|iiƒ|_||_|d jo t ƒ}n|i |iƒt d|d|i d|idgdddtd|ƒ|_||_|i|iƒ|ii |_ ||_ti|||d |d ƒ}|gjp td ‚d |_|_d S( s± Parse `input_lines` and modify the `document` node in place. Extend `StateMachineWS.run()`: set up parse-global data and run the StateMachine. tdocumenttreportertlanguaget title_stylest section_levelitsection_bubble_up_kludgetinlinert input_sourcetsources.RSTStateMachine.run() results should be empty!N(t languagest get_languageRtsettingst language_codeR Rt match_titlesRtNonetInlinertinit_customizationsR RtFalsetmemotattach_observert note_sourcetnodetStateMachineWStrunt input_linest input_offsettresultstAssertionError(R R)RR*RRR+((RR(”s*        (RRRtTrueRR((((RRŒs tNestedStateMachinecBstZdZed„ZRS(sh StateMachine run from within other StateMachine runs, to parse nested document structures. cCs‚||_||_|i|_|i|iiƒ|i|_|i|_||_t i |||ƒ}|gjp td‚|S(s› Parse `input_lines` and populate a `docutils.nodes.document` instance. Extend `StateMachineWS.run()`: set up document-wide data. s1NestedStateMachine.run() results should be empty!N(RR R#RR$R%RRR&R'R(R)R*R+R,(R R)R*R#R&RR+((RR(ºs      (RRRR-R((((RR.³s tRSTStatecBs³tZdZeZgZed„Zd„Zd„Z d„Z d„Z ee e d„Z e hee e d„Zd„Zd „Zd „Zd „Zd „Zd „Zd„ZRS(s` reStructuredText State superclass. Contains methods used by all State subclasses. cCs2hdt<dd<|_ti|||ƒdS(Nt state_classest initial_statetBody(R0R tnested_sm_kwargstStateWSRt state_machinetdebug(R R5R6((RRØscCs‚ti|ƒ|ii}||_|i|_|i|_|i|_|ii|_ t |idƒp|ii |i_ ndS(Ntget_source_and_line( R4t runtime_initR R5R#RRRR&tparentthasattrR7(R R#((RR8Ýs      cCs.y|ii|ƒWntj onXdS(sT Jump to input line `abs_line_offset`, ignoring jumps past the end. N(R R5t goto_linetabs_line_offsettEOFError(R R<((RR;ës cCs9|iid|ii|||iifƒ|dgfS(ss Override `StateWS.no_match` to generate a system message. This code should never be run. sjInternal error: no transition pattern match. State: "%s"; transitions: %s; context: %s; current line: %r.N( R Rtseveret __class__Rt transitionstcontextR5tlineR(R RAR@((Rtno_matchôs,cCs ggfS(sCalled at beginning of file.N((R RA((Rtbofsc CsYd} |djo|i}| d7} n|djo|i}| d7} nt|ƒ}d}| djo-y|i i ƒ}Wqšt j oqšXn|p|d|i|�}n|i||d|id|d|ƒ| djo|i i|ƒn |iƒ|iƒ} |io5t|ƒ|djo|i it|ƒ|ƒn| S( sg Create a new StateMachine rooted at `node` and run it over the input `block`. iiiR6R#R&RN(t use_defaulttstate_machine_classRR t nested_smtstate_machine_kwargsR3tlentblockt block_lengthR5tnested_sm_cachetpopt IndexErrorR6R(R*R#R&RtappendtunlinkR<t new_offsetR9t next_line( R RJR*R&RRFRHRKR5RERQ((Rt nested_parses4          !c  Cs| djo |i} n| djo|iiƒ} n|| d<| d|i| �} |djo |}n|| i |_ x1|iƒD]#\} } t| i || | ƒq�W| i||d|id|d|ƒ| i |i }| iƒ| iƒ|fS(sÀ Create a new StateMachine rooted at `node` and run it over the input `block`. Also keep track of optional intermediate blank lines and the required final one. R1R6R#R&RN(RFRR RGRHR3tcopyR1R6R5tblank_finish_statet blank_finishtstatestextra_settingstitemstkeytvaluetsetattrR(RJR*R#R&RRPR<(R RJR*R&R1RVRURXRRFRHRZR[R5((Rtnested_list_parse*s$         cCs1|i|||ƒo|i|||ƒndS(s=Check for a valid subsection and create one if it checks out.N(R tcheck_subsectionRtstyletlinenotnew_subsectionttitletmessages(R RbRR_R`Rc((RtsectionHscCs(|i}|i}|i}y|i|ƒd}Wn]tj oQt |ƒ|ijo|i |ƒdSq’|i |i ||ƒ7_ dSnX||joM||_t |ƒdjo t|_n|iit |ƒdƒt‚n||djodSn |i |i ||ƒ7_ dSdS(sÙ Check for a valid subsection header. Return 1 (true) or None (false). When a new section is reached that isn't a subsection of the current section, back up the line count (use ``previous_line(-x)``), then ``raise EOFError``. The current StateMachine will finish, then the calling StateMachine can re-examine the title. This will work its way back up the calling chain until the correct section level isreached. @@@ Alternative: Evaluate the title, store the title info & level, and back up the chain until that level is reached. Store in memo? Or return in results? :Exception: `EOFError` when a sibling or supersection encountered. iiN(R R#RRtmyleveltindexR_tlevelt ValueErrorRIROR9ttitle_inconsistentRR`RR-RR5t previous_lineR=(R RR_R`RgReRR#((RR^Ms,         cCs+|iidtid|ƒd|ƒ}|S(NsTitle level inconsistent:tRB(R RR>tnodest literal_blockt sourcetextR`terror(R RnR`Ro((RRivs cCs?|i}|i} |id7_tiƒ} |i| 7_|i||ƒ\}} ti |d|Œ} t| iƒƒ}| di|ƒ| | 7} | |7} | | 7} |ii| | ƒ|iid} |iiƒd}|i|ii| d|d| dtƒ}|i|ƒ|i| jo t‚n| |_dS(s?Append new subsection to document tree. On return, check level.iRktnamesR*R&RN( R R#RReRlRdt section_nodeR9t inline_textRbR`t textnodesttitle_messagest titlenodetnormalize_nametastexttnameRORcRtnote_implicit_targetR5t line_offsettoffsetR<t absoffsetRSR)R-t newabsoffsetR;R=(R RbR`RcRsRxR|R#R}ReRqR{RuRt((RRa|s,        c Csêdi|ƒiƒ}tid|ƒoZt|ƒdjogdfSn0|ddjo|d iƒ}n |d }d}n |}d}|i ||ƒ\}}ti|d |Œ}|ii|ƒ\|_|_|g||fS( sW Return a list (paragraph & messages) & a boolean: literal_block next? s s(?%(or_group)s)%(suffix)sN(t definitionRxtprefixtsuffixtpartst part_stringstpartttypettupleROt build_regexpRR~tor_grouptlocalstregexptcompileR‚tUNICODE( RŽRšR’RxR�R‘R™R“R—R�((RR–¹s R cBs£tZdZd„Zd„Zd„ZdeieifZ dei eiei fZ dZ dZdZd Zd Zd Zd Zd ZdeƒZdZdZde dddedddddgfdde deddddded d!egfgfd"d#eed$gfgfZed%eeƒd&eied'e eiƒd(eied)e eiƒd*eid+eƒeieiBƒd,eid-eƒeieiBƒd.eie d/e ƒd0eied1e ƒd2eied3e ƒd4eieeƒd5eieiBƒd6eid7ed8eƒeieiBƒd9eid:eƒeieiBƒd;eid<eƒeieiBƒƒ Z d=„Z!e"d>„Z#d?„Z$d@„Z%dA„Z&dB„Z'dC„Z(dD„Z)dE„Z*dF„Z+dG„Z,dH„Z-dI„Z.e"dJ„Z/dK„Z0dL„Z1dM„Z2dNZ3dO„Z4dP„Z5hdQe%<dRe&<dSe'<de+<de,<dTe.<dUe-<dVe/<dWe0        /     u(^|(?<=\s|[%s%s]))u($|(?=\s|[%s%s%s]))s (?]s[_~*/=+a-zA-Z0-9]s-(?:%(urilast)s|%(uric)s(?=%(uri_end_delim)s))s"[-_!~*'{|}/#?^`&=+$%a-zA-Z0-9\x00]s× %(emailc)s+(?:\.%(emailc)s+)* # name (?%s)(?P__?)t footnotelabels\[s(?P\]_)s[0-9]+s\#(%s)?s\*s(?P%s)R§s(?P(:%s:)?)s`(?!`)Rªtemphasiss(\*)tstrongs(\*\*)tinterpreted_or_phrase_refs %(non_unescaped_whitespace_escape_before)s ( ` (?P (?P:%(simplename)s:)? (?P__?)? ) ) %(end_string_suffix)s t embedded_urisÚ ( (?:[ \n]+|^) # spaces or beginning of line/string < # open bracket %(non_whitespace_after)s ([^<>\x00]+) # anything but angle brackets & nulls %(non_whitespace_before)s > # close bracket w/o whitespace before ) $ # end of string tliterals(``)ttargets(`)tsubstitution_refs (\|_{0,2})temailt$R�s5 %(start_string_prefix)s (?P (?P # absolute URI (?P # scheme (http, ftp, mailto) [a-zA-Z][a-zA-Z0-9.+-]* ) : ( ( # either: (//?)? # hierarchical URI %(uric)s* # URI characters %(uri_end)s # final URI char ) ( # optional query \?%(uric)s* %(uri_end)s )? ( # optional fragment \#%(uric)s* %(uri_end)s )? ) ) | # *OR* (?P # email address s] ) ) %(end_string_suffix)s R¡s %(start_string_prefix)s ( (pep-(?P\d+)(.txt)?) # reference to source file | (PEP\s+(?P\d+)) # reference by name ) %(end_string_suffix)sR¤s{ %(start_string_prefix)s (RFC(-|\s+)?(?P\d+)) %(end_string_suffix)scCsv|i}|iƒ}|djotSn||d}y||iƒ}Wntj o tSnXt i ||ƒS(sóTest if inline markup start-string is 'quoted'. 'Quoted' in this context means the start-string is enclosed in a pair of matching opening/closing delimiters (not necessarily quotes) or at the end of the match. iiN( R±tstringR¦R"tprestarttendt poststartRNR-tpunctuation_charst match_chars(R R±RÆRÅR¦RÈ((Rt quoted_start§s    cCs}|i} |idƒ} |idƒ} |i|ƒo| | g| | gdfSn|i | | ƒ}|oŒ|idƒo|t |i|idƒ |ƒ} | |idƒ}t | | |!dƒ}| | ||| ƒg| |g|idƒfSn|iid|id|ƒ} t | | | !dƒ} t | | | !dƒ}|i| || ƒ}| | |g| | | gdfS(NR¦Rkis*Inline %s start-string without end-string.RB(R±RÅR¦t matchstartRÇtmatchendR RËt end_patternRƒtendmatchtunescapetrestore_backslashesR„ttextendt rawsourcet nodeclasstgroupRRŠRR`tmsgt problematictprb(R R±R`RÎRÔRÑRÓRÒRØRÅR„RÖRÍRÌRÏ((Rt inline_obj¹s$  4 cCsS|ii||iƒ}ti||d|ƒ}|ii|ƒ}|i |ƒ|S(Ntrefid( R Rtset_idtmessageR9tmsgidRlR×RÓR„tprbidt add_backref(R R„RÓRÜRÝRÞR×((RR×Ðs  cCs@|i|||iitiƒ\}}}}}||||fS(N( R RÙR±R`RœR¼RlRµR¶R®R·t endstring(R R±R`R¶RàR·R®Rµ((RR¼×s0cCs@|i|||iitiƒ\}}}}}||||fS(N( R RÙR±R`RœR½RlRµR¶R®R·Rà(R R±R`R¶RàR·R®Rµ((RR½Üs0cCs|ii}|i}|idƒ}|idƒ}|idƒ} |i dƒ} d}| o| dd!} d}n-|i|ƒo|| g||gfSn|i||ƒ}|oä|idƒoÔ||iƒ}|i dƒoŒ| oe|iidd|ƒ} t|| |!dƒ}|i||| ƒ}|| |g||| gfSn|i d ƒdd!} d }n|i|idƒ } t|||!dƒ}|dd jo›| oi|iid |d|ƒ} t|| |!dƒ}|i||| ƒ}|| |g||| gfSn|i|| |||| t| ƒƒSqŸt|| |!dƒ}|i|| | |ƒ\} }|| | |||fSn|iid d|ƒ} t|||!dƒ}|i||| ƒ}|| |g||| gfS( NR§troleRkiiÿÿÿÿR�sVMultiple roles in interpreted text (both prefix and suffix present; only one allowed).RBR�t_s=Mismatch: both interpreted text role %s and reference suffix.sLInline interpreted text or phrase reference start-string without end-string.( R RœR¾RÎR±RÅR¦RÌRÇRÍt rolestartRÕRátpositionRËRƒRÏRÒRRŠR`RÖRÐR„R×RØtescapedRÓt phrase_reft interpretedtnodelistRc(R R±R`RÓRÒRÅRØR„RcRãRèRåRáRÖRäRÍRÌRÏRÎ((RR¾ásX      "  "  c CsŸ|iii|ƒ} | o£t|| idƒ ƒ}| i dƒ}di |i ƒƒ} |i| ƒ} | o+ti| i dƒd| ƒ}d|_ntd|ƒ‚|p | }qÅnd}t|ƒ} ti||dt|ƒƒ}|g} |dd jo#|o| |d((Rt_loweralpha_to_intñstAcCst|ƒ|S(N(R<R=R>(R=R>((Rt_upperalpha_to_intôscCsti|iƒƒS(N(tromant fromRomanR=tupper(R=((Rt_lowerroman_to_int÷sR2c Bs\tZdZeiiZeƒZhdedddddddd ƒ<d edd dddd dd ƒ<d edd dddd dd ƒe<d?e<d@dA<dBdC<dDdEe<dFd db„Z?dc„Z@dd„ZAd d de„ZBd df„ZCdg„ZDeƒZEedheidieFeGƒeiHeiBƒdjeidkeFeGƒeiHeiBƒdleidmeFeGƒeiHeiBƒƒeE_!dn„ZIdo„ZJdp„ZKdq„ZLdr„ZMds„ZNdt„ZOdu„ZPdv„ZQdw„ZRdx„ZSdy„ZTdz„ZUd{„ZVd|„ZWd}„ZXd~„ZYeIeideGiZeiHeiBƒfeJeid€eGiZeiHeiBƒfeKeid�eiHeiBƒfePeid‚eiHeiBƒfeReidƒeGiZeiHeiBƒfgeE_[d„„Z\d…„Z]d†„Z^d‡„Z_dˆ„Z`d‰„ZadŠ„ZbRS(Œs: Generic classifier of the first line of a block. tparensR�t(R�t)R¦iRÇiÿÿÿÿtrparenRkitperiodt.tarabict loweralphat upperalphat lowerromant upperromans[0-9]+s[a-z]s[A-Z]s [ivxlcdm]+s [IVXLCDM]+RÄs\+-[-+]+-\+ *$s =+( +=+)+ *$s=+[ =]*$s[!-/:-@[-`{-~]tnonalphanum7bits[a-zA-Z]talphas [a-zA-Z0-9]talphanums [a-zA-Z0-9_-]t alphanumplussJ(%(arabic)s|%(loweralpha)s|%(upperalpha)s|%(lowerroman)s|%(upperroman)s|#)tenums%(alphanum)s%(alphanumplus)s*toptnames%(%(alpha)s%(alphanumplus)s*|<[^<>]+>)toptargs!(-|\+)%(alphanum)s( ?%(optarg)s)?tshortopts"(--|/)%(optname)s([ =]%(optarg)s)?tlongopts(%(shortopt)s|%(longopt)s)toptions(?P<%s>%s%s%s)tbulletu[-+*•‣â�ƒ]( +|$)t enumerators((%(parens)s|%(rparen)s|%(period)s)( +|$)t field_markers#:(?![: ])([^:\\]|\\.)*(?>>( +|$)t line_blocks\|( +|$)tgrid_table_toptsimple_table_toptexplicit_markups \.\.( +|$)Rës__( +|$)RBs(%(nonalphanum7bit)s)\1* *$R„c Csl|iiƒ\}}}}|i||ƒ}|i |7_ |p|i |i dƒ7_ n||gfS(s Block quote.s Block quoteN( R R5t get_indentedtindentedtindentRzRVt block_quotetelementsR9RŒRAt next_state( R R±RARiRVRhRfReRz((RRfWsc CsÒg}xÅ|o½|i||ƒ\}} } }}t i ƒ}|i |||ƒ|i |ƒ| o0|i| | ƒ\}}||7}||7}n|}x,|o$|d o|d}|d7}q�Wq W|S(Nii(RhReR tsplit_attributionRztblockquote_linestattribution_linestattribution_offsettnew_line_offsetRlRgt blockquoteRSROtparse_attributiont attributionRc( R ReRzRhRqRcRkRoRnRmRl((RRgas"!    u(---?(?!-)|—) *(?=[^ \n])c Csd}t}xtt|ƒƒD]á}||iƒ} | o¾|o­||djoœ|i i | ƒ} | o|i ||ƒ\}}|o\|||!}|i| iƒddƒ|i|ddƒ|| ||||||fSqìqðnt}q|}qW|ddddfSdS(sá Check for a block quote attribution and split it off: * First line after a blank line must begin with a dash ("--", "---", em-dash; matches `self.attribution_pattern`). * Every line after that must have consistent indentation. * Attributions must be preceded by block quote content. Return a tuple of: (block quote content lines, content offset, attribution lines, attribution offset, remaining indented lines). iRÇR¦N(RtblankR"t nonblank_seentrangeRIRetiR€RBR tattribution_patternR±tcheck_attributiontattribution_endRfta_linest trim_leftRÇRzR-( R ReRzRuRyRsRxRrRfRBR±((RRj{s&  +  cCsÃd}|d}xŸt|dt|ƒƒD]z}||iƒ}|pPn|djo t|ƒt|i ƒƒ}q*t|ƒt|i ƒƒ|jodSq*q*W|d7}||pdfS(st Check attribution shape. Return the index past the end of the attribution, and the indent. iiN(NN( RRftattribution_startRuRtRIReR€RBtlstrip(R ReR{RfRuRB((RRwžs   #  cCs}di|ƒiƒ}|iiƒ|}|i ||ƒ\}}t i |d|Œ}|ii|ƒ\|_|_||fS(Ns Rk(R~ReR€R„R R5R‰RzR`RrRsRcRlRqR&R7RRB(R ReRzR&R„RcR`Rs((RRp²s c Csâtiƒ}|i|7_|id|d<|i|iƒƒ\}}||7}|i i d}|i|i i|d|i iƒdd|ddd|ƒ\}}|i|ƒ|p|i|id ƒ7_ng|gfS( sBullet list item.iR[iR*R&R1t BulletListRVs Bullet listN(Rlt bullet_listt bulletlistR R9R±RÅt list_itemRÇRuRVR5RzR{R]R)R<RnR;RŒRi( R R±RARiRVRRuR{Rn((RR[ºs    cCs”|ii|o|ii|ƒ\}}}n|ii|ƒ\}}}}t i di |ƒƒ}|o|i |d|d|ƒn||fS(Ns R*R&(R R5RBRftget_known_indentedReRzRVtget_first_known_indentedRlR€R~tlistitemRS(R RfRVReRzRƒ((RR€ÌscCsÕ|i|ƒ\}} }}|i|| |ƒpti dƒ‚nt i ƒ} |i | 7_ | djod| d 1, 'ii' -> 2, etc.; ``None`` is returned for invalid enumerator text). The enumerator format has already been determined by the regular expression match. If `expected_sequence` is given, that sequence is tried first. If not, we check for Roman numeral 1. This way, single-character Roman numerals (which are also alphabetical) can be matched. If no sequence has been matched, all sequences are checked in order. Rksenumerator format not matchedRsunknown enumerator sequence: %sRuROtIRPsenumerator sequence not matchediN(R±R²R‰R RUtformatsR‡RR�R¦RÇR„texpected_sequencetsequenceregexpstKeyErrort sequencesRŠt convertersRBtInvalidRomanNumeralErrorR(R R±R•RŠR‡R„R‰R²((RRˆüsD     +           cCsë|djodSny|iiƒ}Wn$tj o|iiƒdSnX|iiƒ|d iƒpdSn|i|d||ƒ}|oR|\}}y,|i|ƒp|i|ƒodSnWqçtj oqçXndS(sç Check validity based on the ordinal value and the second line. Return true if the ordinal is valid and the second line is blank, indented, or starts with the next enumerator or an auto-enumerator. iN(RŠRR R5RRR=Rjtstriptmake_enumeratorR‰R‡tresulttnext_enumeratortauto_enumeratorRt TypeError(R RŠR‰R‡RRRžR�RŸ((RR‹3s(        cCse|djo d}n|djot|ƒ}nè|idƒo3|djod Snt|tdƒdƒ}nU|idƒo4yti |ƒ}WqËti j o d SqËXnt d|ƒ‚|i d ƒo|i ƒ}n1|i d ƒo|iƒ}nt d|ƒ‚|ii|}|i||id }|id|id }||fS( sÒ Construct and return the next enumerated list item marker, and an auto-enumerator ("#" instead of the regular enumerator). Return ``None`` for invalid (out of range) ordinals. RRLRRiR;iRBs!unknown enumerator sequence: "%s"RRDt N(R‰R\tstrRŠtendswithRtchrR<RBttoRomant RomanErrorRRRRDR RUR�R‡R�R�RžRŸ(R RŠR‰R‡RžR\RŸR�((RRœPs0     c CsËtiƒ}|i|7_|i|ƒ\}}||7}|iid}|i |ii |d|ii ƒdd|ddd|ƒ\}}|i|ƒ|p|i|idƒ7_ng|gfS( sField list item.iR*R&R1t FieldListRVs Field listN(Rlt field_listR R9tfieldR±RVR5RzR{R]R)R<R’R;RŒRi( R R±RARiRVR’R©R{R¨((RR]us    cCsó|i|ƒ}|iiƒ\}}|iiƒ} |ii |i ƒƒ\} }}}tiƒ} || _|| _|i|| ƒ\}} | ti|d|Œ7} tidi| ƒ| Œ} | | 7} | o|i| || ƒn| |fS(NRks (R tparse_field_markerR±RxR5R7tsrctsrclineR‰R`R‚RÇReRfRzRVRlR©t field_nodeRRBRrt name_nodest name_messagest field_namet field_bodyR~tparse_field_body(R R±RVR«R¬RfRxRzR®R¯R­R`R±Re((RR©†s$    cCs'|iƒd}||idƒ }|S(s6Extract & return field name from a field marker match.it:N(R±RÕR©trfind(R R±R©((RRª—scCs|i|d|d|ƒdS(NR*R&(R RSReR{R&(R ReR{R&((RR²�sc Cs�tiƒ}y|i|ƒ\} }Wn¯tj o£} |i i d| ƒ} |i | 7_ |i i|iƒƒ\}}}}|i||ƒ}|i |7_ |p|i |idƒ7_ ng|gfSnX|i |7_ || 7}|i id} |i|i i| d|i iƒdd|ddd|ƒ\} }|i| ƒ|p|i |idƒ7_ ng|gfS( sOption list item.uInvalid option list marker: %ss Option listiR*R&R1t OptionListRVN(Rlt option_listt optionlistR toption_list_itemR±RƒRVRRoRRÖR9R5R‚RÇReRfRzRgRhRŒRiR{R]R)R<R’R;(R R±RARiRVRhRfReRzR{RƒRoRÖR’R·((RR^ s0 $   c CsÖ|iiƒ}|i|ƒ} |ii|iƒƒ\}}}}|p |i |ƒtidƒ‚ntid| Œ}tidi|ƒƒ} tid|| ƒ}|o|i|d|d| ƒn||fS(NR„Rks R*R&(R R5R<R{tparse_option_markerR±toptionsR‚RÇReRfRzRVR;RŒR�Rlt option_groupt descriptionR~R¸RS( R R±RVRfReRzR»R{R¸RºR¼((RR¸¾s$   c Csg}|iƒiƒidƒ}xí|D]å}|iƒ}d}|diddƒ}t |ƒdjo||d*d}nt |dƒdjog|di dƒo|di dƒ p|di d ƒo*|dd |ddg|d*d }nt |ƒdjoF|di d ƒo2|d i d ƒodi |dƒg|d)ndt |ƒjo djnoyti|ƒ}|ti|d|dƒ7}t |ƒdjo(|ti|d|dd|ƒ7}n|i|ƒq(tdt |ƒ|fƒ‚q(W|S(s¿ Return a list of `node.option` and `node.option_argument` objects, parsed from an option marker match. :Exception: `MarkupError` for invalid option markers. s, R¡it=iit-s--t+Rktt delimiters;wrong number of option tokens (=%s), should be 1 or 2: "%s"N(toptlistR±RÕR€Rît optionstringst optionstringttokensRÂtfirstoptRIRR£R~RlRZt option_stringtoption_argumentROR( R R±RÅRÆRÇRÃRÂRÄRZ((RR¹Ïs2   T  ;$ cCs@di|iiƒƒ}|iti||ƒ7_g|gfS(Ns ( R~R R5tget_text_blockR�R9Rlt doctest_blockRi(R R±RARiR�((RR_øsc CsJtiƒ} |i| 7_|iiƒ}|i||ƒ\} }}| | 7} |i|7_|pe|ii d}|i|ii|d|iiƒdd| ddddƒ\}}|i|ƒn|p)|i|iidd |dƒ7_nt| ƒo6| did jod| d_n|i| ƒng|gfS( sFirst line of a line block.iR*R&R1t LineBlockRVis%Line block ends without a blank line.RBN(RlR`RJR R9R5R‰R`tline_block_lineR±RBRcRVRzR{R]R)R<RnR;RRŠRIRfRtnest_line_block_linesRi( R R±RARiRVRcR`R{RnRBRJ((RR`ýs,    c Cs©|ii|iƒdtƒ\}}}}di |ƒ}|i ||ƒ\} }ti|d| Œ} |iiƒdjo t|idƒƒd| _n| ||fS(s(Return one line element of a line_block.t until_blanku RkR�iN(R R5R‚R±RÇR-ReRfRzRVR~R„RrR`t text_nodesRcRlRBRÅR€RIRÕ( R R±R`RVRfReRzR„RcRÐRB((RRÍs cCsaxMtdt|ƒƒD]6}||idjo||di||_qqW|i|ƒdS(Ni(RtRIRJRfRfRR tnest_line_block_segment(R RJRf((RRÎ#s  cCsîg}|D]}||iq ~}t|ƒ}g}ti ƒ}xs|D]k}|i|jo|i |ƒqIt |ƒo*|i|ƒ|i |ƒti ƒ}n|i |ƒqIWt |ƒo|i|ƒ|i |ƒn||(dS(N(t_[1]RJtitemRftindentstmintleastt new_itemsRlR`t new_blockRORIR RÑ(R RJRÖRÒRÓRÔR×RØ((RRÑ)s"$       cCs|i||||itiƒS(sTop border of a full table.N(R t table_topR±RARitisolate_grid_tablet tableparsertGridTableParser(R R±RARi((RRa<scCs|i||||itiƒS(sTop border of a simple table.N(R RÙR±RARitisolate_simple_tableRÛtSimpleTableParser(R R±RARi((RRbBsc Css|i||ƒ\}}|i|7_|p8|iidd|i i ƒdƒ}|i|7_ng|gfS(sTop border of a generic table.s Blank line required after table.RBiN( R ttabletisolate_functiont parser_classRèRVR9RRŠR5R‰RÖRi( R R±RARiRàRáRVRèRÖ((RRÙHs c CsË|ƒ\} }}| o¢yX|ƒ}|i| ƒ} |i i ƒt | ƒd}|i | |ƒ} | g|}WqÁtij o4}|i| di|iƒd|iƒ|}qÁXn|}||fS(sParse a table.iR¡R{N(RàRJRcRVRátparserRˆt tabledataR R5R‰RIt tablelinet build_tableRßRèRÛtTableMarkupErrorterrtmalformed_tableR~targsR{( R RàRáRVRäRèRçRâRcRßRãRJ((RRßTs c CsLg}d}y|iidtƒ}WnUtij oF}|i \}}}|i |iidd|d|ƒƒd}nX|iƒ|i|iƒt|diƒƒ}xott|ƒƒD][}||iƒ||<||ddjo,d}|iit|ƒ|ƒ||3PqÀqÀW|ii|dƒp™d}x�tt|ƒd ddƒD]K}|ii||ƒo.|iit|ƒ|dƒ||d3PqYqYW|i|i|ƒƒg||fSnxmtt|ƒƒD]Y}t||ƒ|jp||ddjo'|i|i|ƒƒg||fSqâqâW|||fS( Nit flush_leftsUnexpected indentation.RRBis+|iÿÿÿÿi(RcRVR R5RÊR-RJRŒtUnexpectedIndentationErrorRçRéR«R¬RORRot disconnecttpad_double_widthtdouble_width_pad_charRIR›twidthRtRuRjtgrid_table_top_patR±textendRè( R RVR«R¬RçRuRcRïRJ((RRÚfsH     ,cCsB|ii}|ii}t|ƒd} t||iƒƒ}|i i } d} d} |d}x�|| joñ||} | | ƒ}|oÆt| iƒƒ|jo^|ii||ƒ|i|||d!dƒ}g||| jp||diƒ fSn| d7} |} | djp#|| jp||diƒ o |}PqSn|d7}qcW| o/d}|ii| |ƒ||| d!}n)d}|ii||dƒ||}|i|d|ƒ}g|| fS|ii||ƒ|||d!}|i|iƒ|g|| jp||diƒ fS(Niis5Bottom/header table border does not match top border.is$ or no blank line after table bottomRksNo bottom table border found%s.(R R5RzR¦R)RRItlimitR›ttoplentsimple_table_border_patR±t pattern_matchtfoundRtfound_atRuRBRRRèRcRÇtextraRJRíRî(R RJRÇRuRøRóRcRR¦RòRõRöRBR÷R±((RRÝŒsH       - 0  cCs�|i|idƒdi|ƒ}d}|iiƒt |ƒd}|o|d|7}n|i i |ti||ƒd||ƒ}|gS(NRks sMalformed table.iRB(RJtreplaceR RîR~R�RÜR5R‰RIt startlinetdetailRRoRlRmR{(R RJRûR{RúRoRÜR�((RRè·scCs|\}} }tiƒ} tidt|ƒƒ} | | 7} xL|D]D}ti d|ƒ}|od|i d<|d8}n| |7} qDW| oAti ƒ} | | 7} x(| D]} | |i| |ƒ7} q°Wntiƒ}| |7} x$|D]} ||i| |ƒ7}qñW| S(Ntcolstcolwidthitstub(Rãt colwidthstheadrowstbodyrowsRlRßttgroupRIRýtcolspect stub_columnst attributesttheadtrowR tbuild_table_rowRättbody(R RãRäRRýRRRÿR RRRßRR((RRåÂs.       c CsÁtiƒ} x®|D]¦}|djoqn|\}}}}h} |o|| d`?) # optional open quote (?![ `]) # first char. not space or # backquote (?P # reference name .+? ) %(non_whitespace_escape_before)s (?P=quote) # close quote if open quote used ) (?%(simplename)s)_ | # *OR* ` # open backquote (?![ ]) # not space (?P.+?) # hyperlink phrase %(non_whitespace_escape_before)s `_ # close backquote, # reference mark ) $ # end of string t substitutionsÛ ( (?![ ]) # first char. not space (?P.+?) # substitution text %(non_whitespace_escape_before)s \| # close delimiter ) ([ ]+|$) # followed by whitespace c Cs�|iiƒ\}}|ii|iƒƒ\}}} }|i dƒ}t|ƒ} tidi|ƒƒ}||_||_| ddjoD| d} d|d<| o|di| ƒn|ii|ƒni| djo$d} d|d<|ii|ƒn8|ti d|ƒ7}|di| ƒ|ii|ƒ| o|ii||ƒn|ii||ƒ|o|i|d | d |ƒn|g|fS( Nis iRRRpRRkR*R&(R R5R7R«R¬R‚R±RÇReRfR{RVRÕRRvRxRltfootnoteR~RRBRORtnote_autofootnotetnote_symbol_footnotet note_footnoteRõRÛRS( R R±RVR«R¬RfReRRR{Rx((RRs4$       c Csù|iiƒ\}}|ii|iƒƒ\}}} }|i dƒ}t|ƒ} tidi|ƒƒ}||_||_|ti d|ƒ7}|di| ƒ|ii|ƒ|ii||ƒ|o|i|d| d|ƒn|g|fS(Nis RkRpR*R&(R R5R7R«R¬R‚R±RÇReRfR{RVRÕRRvRxRltcitationR~RRBRORt note_citationRõRS( R R±RVR«R¬RfReRRR{Rx((RR:s$   cCsr|iii}|iiƒ} |ii|i ƒdt dt ƒ\}}} }|i|i ƒ di|ƒ} g} |D]} | t| ƒqy~ }|d}d}xet o]|i |ƒ}|oPn|d7}y|||7}Wq¨tj otdƒ‚q¨Xq¨W||4|dd|i ƒt|ƒdiƒ|d<|i|| | |idƒƒ}|g|fS( NRÏt strip_indents iismalformed hyperlink target.R¡Rx( R texplicitRœRÁR'R5R‰R`R‚R±RÇR-R"RJRfR{RVRÅR~t blocktextRÒRBR­Råt blockindext targetmatchRNRRIR›t make_targetRÕ(R R±RVRåRfRÁRR'RRRÒR`R{RBRJ((Rthyperlink_targetKs,0 '  0cCsÂ|i|||ƒ\}}|djoUti|ddt |ƒƒ}||_ |i |d||ƒ|i i|ƒ|SnB|djo0ti|dƒ}|i ||||ƒ|Sn|SdS(NRìRkRé(R t parse_targetRJt block_textR`t target_typeR�RlRÁRvtindirect_reference_namet add_targett target_nameRtnote_indirect_target(R RJRR`R#RÁR R�((RRds   cCsÃ|os|diƒddjoXdig}|D]}||iƒq3~ƒ}|i|ƒ}|od|fSqzndig}|D]}|di|i ƒƒq‹~ƒ}dt |ƒfS(só Determine the type of reference of a target. :Return: A 2-tuple, one of: - 'refname' and the indirect reference name - 'refuri' and the URI - 'malformed' and a system_message node iÿÿÿÿRâR¡RìRkRéN( RJR›R~RÒRBRòR t is_referenceRìRîRÐ(R RJRR`RòRìRÒRB((RRss "09cCsP|iiiit|ƒƒ}|pdSnt|idƒp |idƒƒS(Ntsimpletphrase( R RRœRòR±RóRRÐRÕ(R RòR±((RR%…scCsÂ||_|ott|ƒƒ}|di|ƒ|o;|i i |ƒ}|o||dR9RcR<((RR;ês$c CsGt|ttfƒodkl}||ƒ}n|iiƒ} |ii }|ii |iƒddƒ\}} } }di|ii||ii d!ƒ} y(|i|| ||ƒ\} }}}Wn_tj oS}|iid|di|i ƒft!i"| | ƒd| ƒ}|g|fSnX||| ||| || ||iƒ }y|i$ƒ}Wn^t&i'i(i)j oI}|ii*|i+|i,d| ƒ}|t!i"| | ƒ7}|g}nXt|t.ƒpt/d |‚xLt0t1|ƒƒD]8}t||t!i3ƒpt/d ||||f‚qñW||p |ii4ƒfS( sá Parse a directive then run its directive function. Parameters: - `directive`: The class implementing the directive. Must be a subclass of `rst.Directive`. - `match`: A regular expression match object which matched the first line of the directive. - `type_name`: The directive name, as used in the source text. - `option_presets`: A dictionary of preset options, defaults for the directive options. Currently, only an "alt" option is passed by substitution definitions (value: the substitution name), which may be used by an embedded image directive. Returns a 2-tuple: list of nodes, and a "blank finish" boolean. (sconvert_directive_functiont strip_topis isError in "%s" directive: %s.R¡RBs+Directive "%s" must return a list of nodes.s6Directive "%s" returned non-Node object (index %s): %rN(5RûR;t FunctionTypet MethodTypetdocutils.parsers.rsttconvert_directive_functionR R5R‰R`Rztinitial_line_offsetR‚R±RÇReRfRVR~R)Rtparse_directive_blockR>t argumentsRºtcontenttcontent_offsetRRûRRoR9RéRlRmtdirective_instanceR(R�tdocutilstparserstrsttDirectiveErrortsystem_messageRgRÖtmsg_nodetlistR,RtRIRutNodetis_next_line_blank(R R;R±R9R>RVR�RûRHR`RGRzRRfReRuRPRIRERDRoRJRº((RR=ös<  & " 6cCsÿ|i}|i}|o*|diƒ o|iƒ|d7}nx(|o |diƒ o|iƒqFW|o~|ip|i p|ocx6t |ƒD]\}} | iƒpPq�q�W|d7}|| } ||d} ||d}n|} |}g} |o|i||| ƒ\} } nh} | o3|ip|i o| ||} |}g} nx2| o*| diƒ o| iƒ|d7}qnW|ip |i o|i|| ƒ} ng} | o| otdƒ‚n| | | |fS(Niiiÿÿÿÿsno content permitted(R;t option_spect has_contentReR›t trim_startRzttrim_endtrequired_argumentstoptional_argumentst enumerateRuRBt arg_blockRHRIR tparse_directive_optionsR>Rºtparse_directive_argumentsRGR(R ReRzR;R>RuRTRURIRHR[RGRBRº((RRF2sJ   "       c Cs³|iƒ} xSt|ƒD]?\}}tit i d|ƒo||}|| }PqqWg}|o@|i ||ƒ\}}|o| i|ƒq©t|ƒ‚n| |fS(NR](R>RTRºRZR[RuRBR‚R±R2Rœt opt_blockR tparse_extension_optionsRTtsuccessR�R R( R R>RTR[R^R`RuRBR�Rº((RR\`s      cCsÇ|i}|i}di|ƒ}|iƒ}t |ƒ|jo t d|t |ƒfƒ‚ndt |ƒ||joL|i o|id||dƒ}qÃt d||t |ƒfƒ‚n|S(Ns s$%s argument(s) required, %s suppliedis+maximum %s argument(s) allowed, %s supplied(R;RXtrequiredRYtoptionalR~R[targ_textRîRGRIRtfinal_argument_whitespaceR(R R;R[RaRGRcRb((RR]rs     $cCstiƒ}|i|d|dddtƒ\}}|t |ƒjod Snyt i ||ƒ}Wn�tj o}dd|idfSngttfj o#}dddi|iƒfSn3t ij o#}dd di|iƒfSnX|od |fSndSd S(sÇ Parse `datalines` for a field list containing extension options matching `option_spec`. :Parameters: - `option_spec`: a mapping of option name to conversion function, which should raise an exception on bad input. - `datalines`: a list of input strings. :Return: - Success value, 1 or 0. - An option dictionary on success, an error string on failure. iR1tExtensionOptionsRVsinvalid option blocksunknown option: "%s"sinvalid option value: %sR¡sinvalid option data: %sisoption data incompletely parsedN(isinvalid option block(isoption data incompletely parsed(RlR¨R&R R]t datalinesR-R’RVRIRtextract_extension_optionsRTRºR—RûRéRhR R~tExtensionOptionError(R RTRfR&RVR’RûRº((RR_ƒs"  c Csz|iiƒ}|iiddtƒ\}}}}di |ƒ}|i i d|ti||ƒd|ƒ}|g|fS(NiRs sUnknown directive type "%s".RB(R R5R‰R`R‚R"ReRfR{RVR~R„RRoR9RlRm( R R9RVRoRfReR„R`R{((RR?¤s $cCs¹|i|iƒiƒ o'|iiƒotiƒgdfSn|ii |iƒƒ\}}}}x(|o |diƒ o|iƒqiWdi|ƒ}ti||ƒg|fS(Niiÿÿÿÿs (R±RÅRÇR›R R5RSRltcommentR‚ReRfR{RVRWR~R„(R R±RVRfReR„R{((RRi®s+$sÍ \.\.[ ]+ # explicit markup start \[ ( # footnote label: [0-9]+ # manually numbered footnote | # *OR* \# # anonymous auto-numbered footnote | # *OR* \#%s # auto-number ed?) footnote label | # *OR* \* # auto-symbol footnote ) \] ([ ]+|$) # whitespace or end of line sÔ \.\.[ ]+ # explicit markup start \[(%s)\] # citation label ([ ]+|$) # whitespace or end of line sÙ \.\.[ ]+ # explicit markup start _ # target indicator (?![ ]|$) # first char. not space or EOL sß \.\.[ ]+ # explicit markup start \| # substitution indicator (?![ ]|$) # first char. not space or EOL sK \.\.[ ]+ # explicit markup start (%s) # directive name [ ]? # optional space :: # directive delimiter ([ ]+|$) # whitespace or end of line cCs>|i|ƒ\}}|i|7_|i|ƒg|gfS(s3Footnotes, hyperlink targets, directives, comments.N(R texplicit_constructR±RèRVR9t explicit_listRi(R R±RARiRVRè((RRcås  c CsÍg}x¡|iiD]“\} }|i|iƒ}|ony| ||ƒSWq¦t j oJ}|i i ƒ}di|iƒ} |i|ii| d|ƒƒPq¦XqqW|i|ƒ\}}|||fS(s>Determine which explicit construct this is, parse & return it.R¡RBN(terrorsR Rt constructsR´R'R±RÅtexpmatchRRoR5R‰R`R~RéRÜRORRŠRiRèRV( R R±RVRlRèR'RnR`RoRÜR´((RRjìs c Cs—|iid}|i|ii|d|iiƒdd|iddd|d|ii ƒ\}}|i |ƒ|p|i|i dƒ7_nd S( s‹ Create a nested state machine for a series of explicit markup constructs (including anonymous hyperlink targets). iR*R&R1tExplicitRVRsExplicit markupN( R R5RzR{R]R)R<R9RVRR’R;RŒ(R RVR’R{((RRküs cCs>|i|ƒ\}}|i|7_|i|ƒg|gfS(sAnonymous hyperlink targets.N(R tanonymous_targetR±RèRVR9RkRi(R R±RARiRVRè((RRë s  c Cs¥|iiƒ}|ii|iƒdtƒ\} }}}|i |iƒ di | ƒ}g}| D]} |t| ƒqd~} |i| ||dƒ}|g|fS(NRÏs Rk(R R5R‰R`R‚R±RÇR-RJRfR{RVRÅR~RRÒRBR­RRÁ( R R±RVRfRÁRRÒR`R{RBRJ((RRp s 'cCs|iio|igdgfSná|iiƒdjotidƒ‚n¸t|iiƒƒdjoC|i i dd|ii ƒƒ}|i |7_ tidƒ‚nY|ii}|i idti||ƒd|ii ƒƒ}|i |7_ g|gfSdS( s,Section title overline or transition marker.tLines::R„iseUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.RBs'Unexpected section title or transition.N(R R5RR±RÅR›RŒR�RIRR‘R‰RÖR9RBRR>RlRmRi(R R±RARiRRÖ((RRB s     cCs|igdgfS(s%Titles, definition lists, paragraphs.R N(R±RÅ(R R±RARi((RR„3 s( sbullets enumerators field_markers option_markersdoctests line_blocksgrid_table_topssimple_table_topsexplicit_markups anonymousslinestext(cRRRRÛt TableParserRîR RUR�tkeysR”R˜t sequencepatsRR?RARERBRCR™R–R‰R‚RšR›Rðtsimple_table_top_patRôtpatsR‡tescapeR�R�Rœtinitial_transitionsRfRgRvRjRwRpR[R€R\RRˆR‹RœR]R©RªR²R^R¸R¹R_R`RÍRÎRÑRaRbRÙRßRÚRÝRèRåRRtvarsR R:RRRRRR%R"R6R3R;R=RFR\R]R_R?RiR3RmRcRjRkRëRpRBR„(((RR2ûsÌ   u69  +     H~     #    # 7  %       )        & +   )&          D  < .   ! ¹,     t RFC2822BodycBsstZdZeiiƒZdedRiR_Rd(R R±RARiR«R_R¬RbRcRRR`RÖR‹((RR‹m s<       c Cs|iiƒd}d} y|iidtƒ} WnHt i j o9}|i \} }} |iidd|d| ƒ} nX|t| ƒ}|i||ƒ\}} |i|7_|i| 7_| o@y|iiƒWntj onX|i|iƒ7_ng|gfS(s Paragraph.iRêsUnexpected indentation.RRBN(R R5R‰RúRRÖRÊR-RJRŒRëRçRéR«R¬RRoRARQRR†R…R9RRR=RmRi( R R±RARiR«RúRçR†RR…R¬RJRÖ((RR„• s( cCs·|iiƒ\}}}}x(|o |diƒ o|iƒqW|p|i ƒSndi |ƒ}t i ||ƒ}|d|_|g}|p|i|idƒƒn|S(sReturn a list of nodes.iÿÿÿÿs is Literal blockN(R R5RdReRfR{RVR›RWtquoted_literal_blockR~R�RlRmRBRèRORŒ(R RVRfReRmR{RèR�((RRm« s  c Cs�|iiƒ}|ii}tiƒ}|i|ii |d|d|dt dhdt f<dd<ƒ}|i |ƒ|iS(NR*R&RRHR0R1tQuotedLiteralBlock(R R5R<RzR{RlR2t parent_nodeRSR)R"R“R/R;tchildren(R R/R{R”R<((RR’» s  ! c Cs|iiƒ\}}}}tidi |t |ƒƒƒ} |ii ƒd} |ii| ƒ\| _| _|i|| ƒ\}}| |7} tid|Œ}| |7} |dddjo$||iidd| dƒ7}n|i|d |d |ƒ| |fS( Ns iRkiiþÿÿÿs::s`Blank line missing before literal block (after the "::")? Interpreted as a definition list item.RBR*R&(R R5RdReRfRzRVRlR�R~ttermlineRQtitemnodeR‰R`R7RRBttermttermlistRcRŽRR‘RS( R R–RVRŽR™RfReRzRcR`R—((RR�Ç s"  s +: +c Cs6t|ƒdjpt‚|i|d|ƒ\}}ti ƒ}|g} xÞt t|ƒƒD]Ê}||}t|tiƒo—|ii|iƒ} t| ƒdjo| dc|7RlRmRÖR9RR@RcR‘RŠROR_R¡RdR|( R R±RARiR_RbRcRR£RR`RÖR‹((RR„@ sh               # cCs§|d}|d|ii}|iiƒd}t|i ƒƒdjo|i |||dƒn|i i dt i||ƒd|ƒ}|i|7_gdgfS(Nis iis+Invalid section title or transition marker.RBR2(RAR£R R5RBRR‰R`RIR€R¤RRoRlRmRÖR9(R R±RARiRR£R`RÖ((RR‹€ s   cCs;|iidd|ƒ}|i|7_|i||ƒdS(Ns`Possible incomplete section title. Treating the overline as ordinary text because it's so short.RB( R RR‘R`RÖR9R RAR(R RARR`RRÖ((RR¤� s  cCs-|ii|ƒg|(tiddƒ‚dS(NR2R„(R R5RjRRARŒtStateCorrection(R RAR((RR • s( RRRR¡RŒRrR„RfR‹R¤R (((RRq s   > R“cBsutZdZhddei<dd