1.1 --- a/moinformat/input/directory.py Tue Aug 07 17:07:03 2018 +0200
1.2 +++ b/moinformat/input/directory.py Tue Aug 07 23:45:24 2018 +0200
1.3 @@ -49,7 +49,9 @@
1.4
1.5 "Return all pages in the context."
1.6
1.7 - return map(self.to_pagename, self.dir.select_files("*"))
1.8 + # Ignore dotfiles.
1.9 +
1.10 + return map(self.to_pagename, self.dir.select_files("[!.]*"))
1.11
1.12 # Page characteristics.
1.13
2.1 --- a/moinformat/parsers/common.py Tue Aug 07 17:07:03 2018 +0200
2.2 +++ b/moinformat/parsers/common.py Tue Aug 07 23:45:24 2018 +0200
2.3 @@ -27,6 +27,7 @@
2.4
2.5 ws_excl_nl = r"[ \f\r\t\v]"
2.6 quotes = "['" '"]' # ['"]
2.7 +dotall = r"(.|\n)"
2.8
2.9 def choice(l):
2.10
2.11 @@ -80,6 +81,7 @@
2.12 Define patterns for the regular expressions in the 'syntax' mapping. In each
2.13 pattern, replace...
2.14
2.15 + \E with a pattern for matching all characters including newlines
2.16 \N with a pattern for matching whitespace excluding newlines
2.17 \Q with a pattern for matching quotation marks
2.18
2.19 @@ -91,6 +93,7 @@
2.20 for name, value in syntax.items():
2.21 value = value.replace(r"\N", ws_excl_nl)
2.22 value = value.replace(r"\Q", quotes)
2.23 + value = value.replace(r"\E", dotall)
2.24
2.25 # Add the name to group names as a prefix.
2.26
3.1 --- a/moinformat/parsers/moin.py Tue Aug 07 17:07:03 2018 +0200
3.2 +++ b/moinformat/parsers/moin.py Tue Aug 07 23:45:24 2018 +0200
3.3 @@ -696,7 +696,8 @@
3.4
3.5 "link" : join((r"\[\[", # [[
3.6 group("target", ".*?"), # target
3.7 - optional(join((r"\|", group("text", ".*?")))), # | text (optional)
3.8 + optional(join((r"\|", # |
3.9 + group("text", r"\E*?")))), # text-incl-nl (optional)
3.10 "]]")), # ]]
3.11
3.12 "macro" : join(("<<", # <<
4.1 --- a/moinformat/serialisers/html/graphviz.py Tue Aug 07 17:07:03 2018 +0200
4.2 +++ b/moinformat/serialisers/html/graphviz.py Tue Aug 07 23:45:24 2018 +0200
4.3 @@ -73,7 +73,7 @@
4.4 l = ["%s='%s'" % (attrname, escape_attr(target))]
4.5 for key, value in attributes.items():
4.6 l.append("%s='%s'" % (key, value))
4.7 - self.out("<%s %s%s>" % (tagname, " ".join(l), closing and " /"))
4.8 + self.out("<%s %s%s>" % (tagname, " ".join(l), closing and " /" or ""))
4.9
4.10 def image(self, target, attributes):
4.11 self._tag("img", "src", target, attributes, True)