From 47479f34e765759030c9bec6137ea25843f357da Mon Sep 17 00:00:00 2001 From: Lubomir Prda <lubomir.prda@vsb.cz> Date: Thu, 26 Jan 2017 15:26:41 +0100 Subject: [PATCH] corrections to python scripts --- scripts/titlemd.py | 2 +- scripts/titlemd_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/titlemd.py b/scripts/titlemd.py index 84fd14b2..2fc5cb89 100755 --- a/scripts/titlemd.py +++ b/scripts/titlemd.py @@ -35,7 +35,7 @@ def main(location): disabled = 0 if line.startswith('#') and disabled == 0: line = titlecase(line[:(line.find("]"))], callback=abbreviations)+line[(line.find("]")):] - if line.startswith('---') or line.startswith('==='): + if (line.startswith('---') or line.startswith('===')) and disabled == 0: prev_line = titlecase(prev_line[:(prev_line.find("]"))], callback=abbreviations)+prev_line[(prev_line.find("]")):] f.write(prev_line) prev_line = line diff --git a/scripts/titlemd_test.py b/scripts/titlemd_test.py index 0c66d441..9f2d34bf 100755 --- a/scripts/titlemd_test.py +++ b/scripts/titlemd_test.py @@ -41,7 +41,7 @@ def main(location): print("-"+line,end="") print("+"+titlecase(line[:(line.find("]"))], callback=abbreviations)+line[(line.find("]")):],end="") return_value = 1 - if line.startswith('---') or line.startswith('==='): + if (line.startswith('---') or line.startswith('===')) and disabled == 0: if prev_line != titlecase(prev_line[:(prev_line.find("]"))], callback=abbreviations)+prev_line[(prev_line.find("]")):]: print() print("-"+prev_line,end="") -- GitLab