changeset 1310:fca5b70800b2

wiki parser: fixed bold/interwiki confusion
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 17 Aug 2006 17:18:58 +0200
parents 238c43cb8877
children 62b8e7e8d5a5
files MoinMoin/parser/text_moin_wiki.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/text_moin_wiki.py	Thu Aug 17 13:03:53 2006 +0200
+++ b/MoinMoin/parser/text_moin_wiki.py	Thu Aug 17 17:18:58 2006 +0200
@@ -30,8 +30,11 @@
 
     # some common strings
     PARENT_PREFIX = wikiutil.PARENT_PREFIX
-    sq_string = ur"('.*?')" # single quoted string
-    dq_string = ur"(\".*?\")" # double quoted string
+    # quoted strings (we require that there is at least one char (that is not the quoting char)
+    # inside to not confuse stuff like '''Contact:''' (just a bold Contact:) with interwiki markup
+    # OtherWiki:'Page with blanks'
+    sq_string = ur"('[^']+?')" # single quoted string
+    dq_string = ur"(\"[^\"]+?\")" # double quoted string
     q_string = ur"(%s|%s)" % (sq_string, dq_string) # quoted string
     attachment_schemas = ["attachment", "inline", "drawing"]
     punct_pattern = re.escape(u'''"\'}]|:,.)?!''')