qfc@s`ddlZddlmZdd dYZdZdZdZdZd ZdS( iN(tidleConftFormatParagraphcBs5eZddgfgZdZdZdZRS(tformatsFormat Paragraphs<>cCs ||_dS(N(teditwin(tselfR((s//usr/lib64/python2.7/idlelib/FormatParagraph.pyt__init__scCs d|_dS(N(tNoneR(R((s//usr/lib64/python2.7/idlelib/FormatParagraph.pytclosesc Csttjddddd}|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|| |jn|jd||jddS(NtmainRt paragraphttypetintttinserts cSs||S(N((tsttl((s//usr/lib64/python2.7/idlelib/FormatParagraph.pyt0siicSs||S(N((titemtprefix((s//usr/lib64/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/lib64/python2.7/idlelib/FormatParagraph.pytformat_paragraph_event"s@   $       (sFormat Paragraphs<>(t__name__t __module__tmenudefsRRR3(((s//usr/lib64/python2.7/idlelib/FormatParagraph.pyRs   c Cstt|jd\}}|jd|d|}xM|jd|ddrt|r|d}|jd|d|}q;W|}t|}t|}xKt||krt|| r|d}|jd|d|}qWd|}|d}|jd|d|}xW|dkr{t||kr{t|| r{|d}|jd|d|}q%Wd|d} | |||j| |fS(Nt.s%d.0s %d.0 lineendts =  #