1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/test_images.txt Sat Feb 23 00:56:17 2013 +0100
1.3 @@ -0,0 +1,3 @@
1.4 +Test of an image: !image.png!
1.5 +
1.6 +Not an image! This is not in the image section!
2.1 --- a/wikiparser.py Sat Feb 23 00:33:11 2013 +0100
2.2 +++ b/wikiparser.py Sat Feb 23 00:56:17 2013 +0100
2.3 @@ -164,7 +164,7 @@
2.4
2.5 monospace_regexp_str = r"{{(?P<monotext>.*?)}}"
2.6 link_regexp_str = r"[[](?P<linktext>.*?)]"
2.7 -image_regexp_str = r"!(?P<imagetext>.*?)!"
2.8 +image_regexp_str = r"!(?P<imagetext>\S.*?)!"
2.9
2.10 # Word-dependent patterns.
2.11 # Here, the unbracketed markers must test for the absence of surrounding word