Commit 2e8683c1 authored by Chris McDonough's avatar Chris McDonough

Changed \0's to \000's for regexes.

parent a5c6a17c
...@@ -526,7 +526,7 @@ class DocumentClass: ...@@ -526,7 +526,7 @@ class DocumentClass:
def doc_description( def doc_description(
self, paragraph, self, paragraph,
delim = re.compile('\s+--\s+').search, delim = re.compile('\s+--\s+').search,
nb=re.compile(r'[^\0- ]').search, nb=re.compile(r'[^\000- ]').search,
): ):
top=paragraph.getColorizableTexts()[0] top=paragraph.getColorizableTexts()[0]
......
...@@ -811,7 +811,7 @@ class DocumentClass: ...@@ -811,7 +811,7 @@ class DocumentClass:
def doc_description( def doc_description(
self, paragraph, self, paragraph,
delim = re.compile(r'\s+--\s+').search, delim = re.compile(r'\s+--\s+').search,
nb=re.compile(r'[^\0- ]').search, nb=re.compile(r'[^\000- ]').search,
): ):
top=paragraph.getColorizableTexts()[0] top=paragraph.getColorizableTexts()[0]
......
...@@ -106,17 +106,17 @@ def StructuredText(aStructuredString, level=0): ...@@ -106,17 +106,17 @@ def StructuredText(aStructuredString, level=0):
def html_with_references(text, level=1): def html_with_references(text, level=1):
text = re.sub( text = re.sub(
r'[\0\n]\.\. \[([0-9_%s-]+)\]' % letters, r'[\000\n]\.\. \[([0-9_%s-]+)\]' % letters,
r'\n <a name="\1">[\1]</a>', r'\n <a name="\1">[\1]</a>',
text) text)
text = re.sub( text = re.sub(
r'([\x00- ,])\[(?P<ref>[0-9_%s-]+)\]([\x00- ,.:])' % letters, r'([\000- ,])\[(?P<ref>[0-9_%s-]+)\]([\000- ,.:])' % letters,
r'\1<a href="#\2">[\2]</a>\3', r'\1<a href="#\2">[\2]</a>\3',
text) text)
text = re.sub( text = re.sub(
r'([\0- ,])\[([^]]+)\.html\]([\0- ,.:])', r'([\000- ,])\[([^]]+)\.html\]([\000- ,.:])',
r'\1<a href="\2.html">[\2]</a>\3', r'\1<a href="\2.html">[\2]</a>\3',
text) text)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment