summaryrefslogtreecommitdiff
path: root/WikiTrans/wikimarkup.py
diff options
context:
space:
mode:
Diffstat (limited to 'WikiTrans/wikimarkup.py')
-rw-r--r--WikiTrans/wikimarkup.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/WikiTrans/wikimarkup.py b/WikiTrans/wikimarkup.py
index d56c664..2fad0af 100644
--- a/WikiTrans/wikimarkup.py
+++ b/WikiTrans/wikimarkup.py
@@ -86,7 +86,7 @@ class TagAttributes(object):
class BaseWikiMarkup(object):
- delim = re.compile("^==+\s*|\s*==+\s*$|(^----$)|^\\*+|^#+|^[;:]+|(\\[\\[)|\\[|(\\{\\{)|(\\]\\])|\\]|(\\}\\})|\\||(\\'\\'\\'?)|<")
+ delim = re.compile("^==+[ \t]*|[ \t]*==+[ \t]*$|(^----$)|^\\*+|^#+|^[;:]+|(\\[\\[)|\\[|(\\{\\{)|(\\]\\])|\\]|(\\}\\})|\\||(\\'\\'\\'?)|<")
otag = re.compile("<(?P<tag>[a-zA-Z0-9_]+)(?:\s+(?P<args>[^>]+))?\s*(?P<closed>/)?>")
ctag = re.compile("</(?P<tag>[a-zA-Z0-9_]+)\s*>")
refstart = re.compile("^https?://")
@@ -667,7 +667,8 @@ class BaseWikiMarkup(object):
if self.peektkn()['type'] == 'NL':
break
else:
- self.dprint(80, "LEAVE parse_header=%s", "None")
+ self.dprint(80, "LEAVE parse_header=%s, tok=%s",
+ "None", self.peektkn())
return None
else:
x = self.parse_inline(tok)
@@ -792,9 +793,6 @@ class BaseWikiMarkup(object):
return ret
def parse0(self):
- if self.tokind == 0:
- self.newline = True
- return self.parse_para()
tok = self.getkn()
self.dprint(80, "ENTER parse0(%s)", tok)
toktype = tok['type']

Return to:

Send suggestions and report system problems to the System administrator.