mò cõOc@sÀdZdZdkZdkZdklZdklZhdddf<ddd f<d d d f<d ddf<dddf<dddf<dddf<dddf<dddf<dddf<dddf<dd df<dd d f<d!d d"f<d#d d$f<d%d d&f<d'd d(f<d)d d*f<d+d d,f<d-d d.f<d/d d0f<d1d d2f<d3d4d5f<d6d4d7f<d8d4d9f<d:d;d<f<d=d;d>f<d?d@dAf<dBd@dCf<dDd@dEf<dFd@dGf<dHdIdJf<dKdLdMf<dNdOdPf<dQdOdRf<dSdOdTf<dUdOdVf<dWdOdXf<dYdOdZf<d[dOd\f<d]dOd^f<d_dOd`f<dadOdbf" (without space in between). To be called from directive option conversion functions. s^([0-9.]+) *(%s)$t|is8not a positive measure of one of the following units: %st s"%s"iN( tretmatchRjtunitsR{R^tAssertionErrortfloattgroupR}R‚ti(R{R™R�R‚R˜((Rxt get_measureÝs=cCst|tdgƒS(NR�(RžR{t length_units(R{((Rxtlength_or_unitlessïsR�cCsFyt|tdgƒSWn'tj ot|dgƒ|SnXdS(sÈ Return normalized string of a length or percentage unit. Add if there is no unit. Raise ValueError if the argument is not a positive measure of one of the valid CSS units (or without unit). >>> length_or_percentage_or_unitless('3 pt') '3pt' >>> length_or_percentage_or_unitless('3%', 'em') '3%' >>> length_or_percentage_or_unitless('3') '3' >>> length_or_percentage_or_unitless('3', 'px') '3px' t%R�N(RžR{RŸR}tdefault(R{R¢((Rxt length_or_percentage_or_unitlessòs cCs{|djotdƒ‚n|iƒ}g}xE|D]=}ti|ƒ}|ptd|ƒ‚n|i |ƒq6W|S(s± Convert the argument into a list of ID-compatible strings and return it. (Directive option conversion function.) Raise ``ValueError`` if no argument is found. s#argument required but none supplieds"cannot make "%s" into a class nameN( R{R^R}R†tnamest class_namesRytnodestmake_idt class_nameRc(R{RyR¨R¤R¥((Rxt class_options  s2(?:0x|x|\\x|U\+?|\\u)([0-9a-f]+)$|&#x([0-9a-f]+);$cCs¡yu|iƒott|ƒƒSnQti|ƒ}|o6|idƒp |idƒ}tt|dƒƒSn|SWn%tj o}t d|ƒ‚nXdS(sŒ Convert a Unicode character code to a Unicode character. (Directive option conversion function.) Codes may be decimal numbers, hexadecimal numbers (prefixed by ``0x``, ``x``, ``\x``, ``U+``, ``u``, or ``\u``; e.g. ``U+262E``), or XML-style numeric character entities (e.g. ``☮``). Other text remains as-is. Raise ValueError for illegal Unicode code values. iiiscode too large (%s)N( RtisdigittunichrRˆtunicode_patternR˜RœR‰t OverflowErrorRuR}(RR‰RuR˜((Rxt unicode_codes  cCs7t|ƒ}t|ƒdjotd|ƒ‚n|S(sš A single character is returned as-is. Unicode characters codes are converted as in `unicode_code`. (Directive option conversion function.) is8%r invalid; must be a single character or a Unicode codeN(R®R{tchartlenR}(R{R¯((Rxtsingle_char_or_unicode4s  cCs>|djo d}n$|djo d}n t|ƒ}|S(s� As with `single_char_or_unicode`, but "tab" and "space" are also supported. (Directive option conversion function.) ttabs tspaceR–N(R{R¯R±(R{R¯((Rxt$single_char_or_whitespace_or_unicode?s     cCs-t|ƒ}|djotdƒ‚n|S(s› Converts the argument into an integer. Raises ValueError for negative, zero, or non-integer values. (Directive option conversion function.) is(negative or zero value; must be positiveN(RˆR{R‰R}(R{R‰((Rxt positive_intLs   cCsQd|jo|idƒ}n |iƒ}g}|D]}|t|ƒq7~S(sÅ Converts a space- or comma-separated list of values into a Python list of integers. (Directive option conversion function.) Raises ValueError for non-positive-integer values. t,N(R{R†tentriesR‚tentryRµ(R{R‚R¸R·((Rxtpositive_int_listVs   cCs;yti|ƒWn#tj otd|ƒ‚nX|S(sŒ Verfies the encoding argument by lookup. (Directive option conversion function.) Raises ValueError for unknown encodings. sunknown encoding: "%s"N(tcodecstlookupR{t LookupErrorR}(R{((Rxtencodingds cCswy|iƒiƒ}Wn)tj otdt|ƒƒ‚nX||jo|Sntd|t|ƒfƒ‚dS(s Directive option utility function, supplied to enable options whose argument must be a member of a finite set of possible values (must be lower case). A custom conversion function must be written to use it. For example:: from docutils.parsers.rst import directives def yesno(argument): return directives.choice(argument, ('yes', 'no')) Raise ``ValueError`` if no argument is found or if the argument's value is not valid (not an entry in the supplied list). s'must supply an argument; choose from %ss"%s" unknown; choose from %sN(R{RYR|R‰RbR}t format_valuestvalues(R{R¿R‰((Rxtchoiceqs cCs>ddig}|d D]}|d|q~ƒ|dfS(Ns %s, or "%s"s, iÿÿÿÿs"%s"(RjR‚R¿R„(R¿R‚R„((RxR¾‹s($t__doc__t __docformat__R—RºtdocutilsR¦tdocutils.parsers.rst.languagestenRfRmR]RwRzR~RR€R…R‡RŠRŒRŸRžR R£R©tcompilet IGNORECASER¬R®R±R´RµR¹R½RÀR¾(R©R½R€RÂR±RmR®RRžRwR¬R—R´RŒRŸRŠR¾R¹RÀR~RµRºR…R]R¦RfR‡RzR R£((Rxt?sD    ÿÿ�2 :