mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
markdown-preprocess: add generic include mechanism
This is what was supposed to be an easy two-or-three-line change to enable a more general-purpose include mechanism than '@@option'; one that could include an arbitrary file. This is commit 2 of 2, the "easy" part. Unfortunately, it's not looking good. The source .md file has UTF8 checkmarks, and nroff is not happy with those: the generated man pages are gross. Another problem: the source .md might need tweaking, because we don't want a level 1 header in the man page. Obvious solution is to make kubernetes_support.md a .md.in file as well, and move the tables to a separate file (or files). Deferred for later. Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
@ -43,6 +43,10 @@ class Preprocessor():
|
||||
_, optionname = line.strip().split(" ")
|
||||
optionfile = os.path.join("options", optionname + '.md')
|
||||
self.insert_file(fh_out, optionfile)
|
||||
# '@@include relative-path/must-exist.md'
|
||||
elif line.startswith('@@include '):
|
||||
_, path = line.strip().split(" ")
|
||||
self.insert_file(fh_out, path)
|
||||
else:
|
||||
fh_out.write(line)
|
||||
|
||||
|
Reference in New Issue
Block a user