From 7ebec70cdcd8a0d75c64b31c4c627339d700c971 Mon Sep 17 00:00:00 2001 From: Thomas Schmidts Date: Thu, 19 Feb 2015 15:44:59 +0100 Subject: [PATCH] changed deprecated.py to change wrong headings --- Documentation/Books/deprecated.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Documentation/Books/deprecated.py b/Documentation/Books/deprecated.py index d8f328d6e2..c52916190f 100644 --- a/Documentation/Books/deprecated.py +++ b/Documentation/Books/deprecated.py @@ -27,10 +27,14 @@ def replaceCode(pathOfFile, newVersionNumber): lines = lines.replace("","") lines = lines.replace("","") lines = lines.replace("","") - lines = lines.replace("!CHAPTER","#") - lines = lines.replace("!SECTION","##") - lines = lines.replace("!SUBSECTION","###") - lines = lines.replace("!SUBSUBSECTION","####") + #lines = lines.replace("!CHAPTER","#") + lines = re.sub("!CHAPTER\s+" + "(.*)", r"

\g<1>

", lines) + #lines = lines.replace("!SECTION","##") + lines = re.sub("!SECTION\s+" + "(.*)", r"

\g<1>

", lines) + #lines = lines.replace("!SUBSECTION","###") + lines = re.sub("!SUBSECTION\s+" + "(.*)", r"

\g<1>

", lines) + #lines = lines.replace("!SUBSUBSECTION","####") + lines = re.sub("!SUBSUBSECTION\s+" + "(.*)", r"

\g<1>

", lines) lines = lines.replace("VERSION_NUMBER", newVersionNumber) f.write(lines) f.close() @@ -44,4 +48,4 @@ if __name__ == '__main__': for i in path: dirpath = os.path.abspath(os.path.join(os.path.dirname( __file__ ), os.pardir,"ArangoDB/../../"+i)) print "Tagging deprecated files" - walk_on_files(dirpath, newVersionNumber) \ No newline at end of file + walk_on_files(dirpath, newVersionNumber)