From 9bc7600d9761cfe094edb22ae63461934dff2ff1 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Sun, 9 Oct 2022 19:08:03 +0400 Subject: [PATCH] Add warnings to Moire generated files. --- CONTRIBUTING.md | 5 +++++ README.md | 5 ++++- doc/INSTALL.md | 5 +++++ doc/moi/readme.moi | 2 -- map_machine/doc/moire_manager.py | 12 ++++++++++++ 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 76b3ab7..44db7e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,8 @@ + + Contributing ============ diff --git a/README.md b/README.md index 8783a3b..de13390 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ - + The **Map Machine** project consists of diff --git a/doc/INSTALL.md b/doc/INSTALL.md index 5ffa7a8..c873a66 100644 --- a/doc/INSTALL.md +++ b/doc/INSTALL.md @@ -1,3 +1,8 @@ + + Install ------- diff --git a/doc/moi/readme.moi b/doc/moi/readme.moi index bd53cb6..d7729d0 100644 --- a/doc/moi/readme.moi +++ b/doc/moi/readme.moi @@ -1,5 +1,3 @@ -\title {Map Machine} - The \b {Map Machine} project consists of \list diff --git a/map_machine/doc/moire_manager.py b/map_machine/doc/moire_manager.py index 3728b54..f99d8f4 100644 --- a/map_machine/doc/moire_manager.py +++ b/map_machine/doc/moire_manager.py @@ -265,6 +265,18 @@ class MapMachineMarkdown(MapMachineMoire, DefaultMarkdown): images = {} + def body(self, arg: Arguments) -> str: + """Remove redundant new lines and add a warning.""" + return ( + "\n\n" + + self.parse(arg[0], in_block=True) + .replace("\n\n\n", "\n\n") + .replace("\n\n\n", "\n\n") + ) + def color(self, arg: Arguments) -> str: """Ignore colors in Markdown.""" return self.clear(arg[0])