From 4252445ea263737e93b8378af5806ad980071a1a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 4 Mar 2020 16:59:02 +0100 Subject: [PATCH] remove only first hashtag from a multiline comment --- CHANGELOG.md | 7 +------ ansibledoctor/Annotation.py | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cc3652..5d30138 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,2 @@ * BUGFIX - * add `role_name` config option to overwrite name of the role - * fix not aborting overwrite dialog - * fix failed loading of empty yaml files - * fix failed loading of yaml files containing `!unsafe` tag -* FEATURE - * add basic hugo theme + * remove only first hashtag from a multiline comment diff --git a/ansibledoctor/Annotation.py b/ansibledoctor/Annotation.py index 140901b..535b806 100644 --- a/ansibledoctor/Annotation.py +++ b/ansibledoctor/Annotation.py @@ -139,7 +139,7 @@ class Annotation: self._file_handler.seek(current_file_position) break - final = next_line.replace("#", "").rstrip() + final = re.findall(r"\#(.*)", next_line)[0].rstrip() if final[:1] == " ": final = final[1:] final = newline + final