summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2018-08-05 09:26:12 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2018-08-05 09:26:12 (GMT)
commit8d24e13c1caddd6163972cb6bb7c58815346a202 (patch) (unidiff)
tree46542db83f8158523e626ed560f50698181f51b1
parenta4917480cc989ce2cbaee79345149a7be22eccac (diff)
downloadwikitrans-8d24e13c1caddd6163972cb6bb7c58815346a202.tar.gz
wikitrans-8d24e13c1caddd6163972cb6bb7c58815346a202.tar.bz2
Fix parsing of closed tags with whitespace before '/>'
* WikiTrans/wikimarkup.py (BaseWikiMarkup.otag): Fix the P<args> named part so that it cannot start with a slash.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--WikiTrans/wikimarkup.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/WikiTrans/wikimarkup.py b/WikiTrans/wikimarkup.py
index 0987da2..6cbf5de 100644
--- a/WikiTrans/wikimarkup.py
+++ b/WikiTrans/wikimarkup.py
@@ -92,7 +92,7 @@ class TagAttributes(object):
92class BaseWikiMarkup(object): 92class BaseWikiMarkup(object):
93 93
94 delim = re.compile("^==+[ \t]*|[ \t]*==+[ \t]*$|(^----$)|^\\*+|^#+|^[;:]+|(\\[\\[)|\\[|(\\{\\{)|(\\]\\])|\\]|(\\}\\})|\\||(\\'\\'\\'?)|<") 94 delim = re.compile("^==+[ \t]*|[ \t]*==+[ \t]*$|(^----$)|^\\*+|^#+|^[;:]+|(\\[\\[)|\\[|(\\{\\{)|(\\]\\])|\\]|(\\}\\})|\\||(\\'\\'\\'?)|<")
95 otag = re.compile("<(?P<tag>[a-zA-Z0-9_]+)(?:\s+(?P<args>[^>]+))?\s*(?P<closed>/)?>") 95 otag = re.compile("<(?P<tag>[a-zA-Z0-9_]+)(?:\s+(?P<args>[^/][^>]+))?\s*(?P<closed>/)?>")
96 ctag = re.compile("</(?P<tag>[a-zA-Z0-9_]+)\s*>") 96 ctag = re.compile("</(?P<tag>[a-zA-Z0-9_]+)\s*>")
97 refstart = re.compile("^https?://") 97 refstart = re.compile("^https?://")
98 98

Return to:

Send suggestions and report system problems to the System administrator.