Zine

open source content publishing system


Changeset 1288:c58d92b16aa4


Ignore:
Timestamp:
01/11/10 00:33:50 (2 years ago)
Author:
Georg Brandl <georg@…>
Branch:
default
Message:

Remove trailing whitespace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zine/_ext/pottymouth.py

    • Property exe set to *
    r695 r1288  
    6262    # The following are simple, context-independent replacement tokens 
    6363    TokenMatcher('EMDASH'  , r'(--)'    , replace=unichr(8212)), 
    64     # No way to reliably distinguish Endash from Hyphen, Dash & Minus,  
     64    # No way to reliably distinguish Endash from Hyphen, Dash & Minus, 
    6565    # so we don't.  See: http://www.alistapart.com/articles/emen/ 
    6666 
     
    8989    Replacer(r"('')", unichr(8221)), 
    9090 
    91     # First we look for inter-word " and '  
     91    # First we look for inter-word " and ' 
    9292    Replacer(r'(\b"\b)', unichr(34)), # double prime 
    9393    Replacer(r"(\b'\b)", unichr(8217)), # apostrophe 
    94     # Then we look for opening or closing " and '  
    95     Replacer(r'(\b"\B)', unichr(8221)), # close double quote  
     94    # Then we look for opening or closing " and ' 
     95    Replacer(r'(\b"\B)', unichr(8221)), # close double quote 
    9696    Replacer(r'(\B"\b)', unichr(8220)), # open double quote 
    9797    Replacer(r"(\b'\B)", unichr(8217)), # close single quote 
    9898    Replacer(r"(\B'\b)", unichr(8216)), # open single quote 
    9999 
    100     # Then we look for space-padded opening or closing " and '  
     100    # Then we look for space-padded opening or closing " and ' 
    101101    Replacer(r'(")(\s)', unichr(8221)+r'\2'), # close double quote 
    102     Replacer(r'(\s)(")', r'\1'+unichr(8220)), # open double quote  
     102    Replacer(r'(\s)(")', r'\1'+unichr(8220)), # open double quote 
    103103    Replacer(r"(')(\s)", unichr(8217)+r'\2'), # close single quote 
    104104    Replacer(r"(\s)(')", r'\1'+unichr(8216)), # open single quote 
     
    292292                 unordered_list=True, # disables all unordered lists (<ul>) 
    293293                 ordered_list=True,   # disables all ordered lists (<ol>) 
    294                  numbered_list=True,  # disables '\d+\.' lists  
     294                 numbered_list=True,  # disables '\d+\.' lists 
    295295                 blockquote=True,     # disables '>' <blockquote>s 
    296296                 bold=True,           # disables *bold* 
     
    318318            elif n == 'EMAIL' and not email:                           continue 
    319319            elif n in ('HASH','DASH','NUMBERDOT','ITEMSTAR','BULLET') and not all_lists: 
    320                 continue  
     320                continue 
    321321            elif n in ('DASH','ITEMSTAR','BULLET') and not unordered_list: 
    322322                continue 
     
    351351                    p += len(content) 
    352352 
    353                     if tm.replace is not None:  
     353                    if tm.replace is not None: 
    354354                        unmatched_collection += tm.replace 
    355355                        break 
     
    531531            else: 
    532532                finished.append(top) 
    533              
     533 
    534534        return finished 
    535535 
     
    598598        stack = [] 
    599599        finished = [] 
    600          
     600 
    601601        last_bold_idx = -1 
    602602        last_ital_idx = -1 
     
    733733            nb = self._parse_block(b) 
    734734            parsed_blocks.append(nb) 
    735          
     735 
    736736        return parsed_blocks 
    737737 
Note: See TracChangeset for help on using the changeset viewer.