Add warnings to Moire generated files.

This commit is contained in:
Sergey Vartanov 2022-10-09 19:08:03 +04:00
parent 5598a334e9
commit 9bc7600d97
5 changed files with 26 additions and 3 deletions

View file

@ -1,3 +1,8 @@
<!--
This is generated file.
Do not edit it manually, edit the Moire source file instead.
-->
Contributing
============

View file

@ -1,4 +1,7 @@
<!--
This is generated file.
Do not edit it manually, edit the Moire source file instead.
-->
The **Map Machine** project consists of

View file

@ -1,3 +1,8 @@
<!--
This is generated file.
Do not edit it manually, edit the Moire source file instead.
-->
Install
-------

View file

@ -1,5 +1,3 @@
\title {Map Machine}
The \b {Map Machine} project consists of
\list

View file

@ -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"
" This is generated file.\n"
" Do not edit it manually, edit the Moire source file instead.\n"
"-->\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])