ó ú^‚Rc@s`ddlZddlmZdd d„ƒYZd„Zd„Zd„Zd„Zd „ZdS( iÿÿÿÿN(tidleConftFormatParagraphcBs5eZddgfgZd„Zd„Zd„ZRS(tformatsFormat Paragraphs<>cCs ||_dS(N(teditwin(tselfR((s-/usr/lib/python2.7/idlelib/FormatParagraph.pyt__init__scCs d|_dS(N(tNoneR(R((s-/usr/lib/python2.7/idlelib/FormatParagraph.pytclosesc Csçttjdddddƒƒ}|jj}|jjƒ\}}|ri|ri|j||ƒ}d}n$t||jdƒƒ\}}}}|rQ|j dƒ}t t |ƒd „|ƒ}dj |ƒ}t |t |ƒd ƒ} t|| ƒ} | j dƒ} d} | d s&d} | d } n|d „} dj t | | ƒƒ| } nt||ƒ} |jd ddƒ| |krÆ|jd|ƒ|jƒ|j||ƒ|j|| ƒ|jƒn|jd|ƒ|jdƒdS(NtmainRt paragraphttypetintttinserts cSs||S(N((tsttl((s-/usr/lib/python2.7/idlelib/FormatParagraph.pyt0siiÿÿÿÿcSs||S(N((titemtprefix((s-/usr/lib/python2.7/idlelib/FormatParagraph.pyR@stsels1.0tendtbreak(R Rt GetOptionRttexttget_selection_indicestgettfind_paragraphtindextsplittmaptlentjointmaxtreformat_paragrapht tag_removetmark_settundo_block_starttdeleteR tundo_block_stoptsee( RteventtmaxformatwidthRtfirsttlasttdatatcomment_headertlinest format_widthtnewdatat block_suffixtbuilder((s-/usr/lib/python2.7/idlelib/FormatParagraph.pytformat_paragraph_event"s@   $       (sFormat Paragraphs<>(t__name__t __module__tmenudefsRRR3(((s-/usr/lib/python2.7/idlelib/FormatParagraph.pyRs   c Cs¦tt|jdƒƒ\}}|jd|d|ƒ}xM|jd|ddƒr‡t|ƒr‡|d}|jd|d|ƒ}q;W|}t|ƒ}t|ƒ}xKt|ƒ|krót||ƒ ró|d}|jd|d|ƒ}q©Wd|}|d}|jd|d|ƒ}xW|dkr{t|ƒ|kr{t||ƒ r{|d}|jd|d|ƒ}q%Wd|d} | |||j| |ƒfS(Nt.s%d.0s %d.0 lineendts =  #