Show
Ignore:
Timestamp:
09/11/08 11:38:30 (18 months ago)
Author:
JensDiemer
Message:

-patch the creole markup, so it don't clashes with django template tags.
-Add a unitest and merge some parts from the tinxTextile markup test.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pylucid_project/PyLucid/system/markups/creole.py

    r1634 r1761  
    4444            ]] 
    4545        )''' 
     46 
     47    #--------------------------------------------------------------------------     
     48    # PyLucid Patch: 
     49    # The image rule should not match on django template tags! So we make it 
     50    # more restricted. 
     51    # It matches only if... 
     52    # ...image target ends with a picture extention 
     53    # ...separator >|< and the image text exist 
    4654    image = r'''(?P<image> 
    4755            {{ 
    48             (?P<image_target>.+?) \s* 
    49             ([|] \s* (?P<image_text>.+?) \s*)? 
     56            (?P<image_target>.+?\.jpg|\.jpeg|\.gif|\.png) \s* 
     57            (\| \s* (?P<image_text>.+?) \s*)? 
    5058            }} 
    51         )''' 
     59        )(?i)''' 
     60    #-------------------------------------------------------------------------- 
     61 
    5262    macro = r'''(?P<macro> 
    5363            <<