changeset 2374:629dea07759f

do not parse single-quoted page names as quoted fixes bugs with ['text_html'] being a link
author Johannes Berg <johannes AT sipsolutions DOT net>
date Thu, 12 Jul 2007 14:40:06 +0200
parents 7e7560f2cddd
children f9b0d11a6569
files MoinMoin/parser/text_moin_wiki.py MoinMoin/wikiutil.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/text_moin_wiki.py	Thu Jul 12 14:37:27 2007 +0200
+++ b/MoinMoin/parser/text_moin_wiki.py	Thu Jul 12 14:40:06 2007 +0200
@@ -91,7 +91,7 @@
 (?P<tableZ>\|\| $)
 (?P<table>(?:\|\|)+(?:<[^>]*?>)?(?!\|? $))
 (?P<heading>^\s*(?P<hmarker>=+)\s.*\s(?P=hmarker) $)
-(?P<interwiki>[A-Z][a-zA-Z]+\:(%(q_string)s|([^\s'\"\:\<\|]([^\s%(punct)s]|([%(punct)s][^\s%(punct)s]))+)))
+(?P<interwiki>[A-Z][a-zA-Z]+\:(%(dq_string)s|([^\s'\"\:\<\|]([^\s%(punct)s]|([%(punct)s][^\s%(punct)s]))+)))
 (?P<word>%(word_rule)s)
 (?P<url_bracket>\[((%(url)s)\:|#|\:)[^\s\]]+(\s[^\]]+)?\])
 (?P<url>%(url_rule)s)
@@ -100,12 +100,12 @@
 (?P<smileyA>^(%(smiley)s)(?=\s))
 (?P<ent_symbolic>&[a-zA-Z]+;)
 (?P<ent>[<>&])
-(?P<wikiname_bracket>\[%(q_string)s.*?\])
+(?P<wikiname_bracket>\[%(dq_string)s.*?\])
 (?P<tt_bt>`.*?`)"""  % {
 
         'url': url_pattern,
         'punct': punct_pattern,
-        'q_string': q_string,
+        'dq_string': dq_string,
         'ol_rule': ol_rule,
         'dl_rule': dl_rule,
         'url_rule': url_rule,
--- a/MoinMoin/wikiutil.py	Thu Jul 12 14:37:27 2007 +0200
+++ b/MoinMoin/wikiutil.py	Thu Jul 12 14:40:06 2007 +0200
@@ -482,7 +482,7 @@
 
 # Quoting of wiki names, file names, etc. (in the wiki markup) -----------------------------------
 
-QUOTE_CHARS = u"'\""
+QUOTE_CHARS = u'"'
 
 def quoteName(name):
     """ put quotes around a given name """