diff options
author | pennae <github@quasiparticle.net> | 2022-08-20 23:21:30 +0200 |
---|---|---|
committer | pennae <82953136+pennae@users.noreply.github.com> | 2022-08-27 19:18:29 +0200 |
commit | 65fd6f077455a9d16cf73f5c93f65816d0c66616 (patch) | |
tree | 5bbf02e70104a22bff4c459792e867033e89964c /nixos/lib | |
parent | 51a11254a7031ddfaa820e7dec55436f74881da9 (diff) |
nixos/make-options-doc: eat newlines in MD admonitions
leaving some newlines around after an admonition was closed causes the newline rule to match, which in turn inserts literallayout newlines into te xml output. that's not what we want.
Diffstat (limited to 'nixos/lib')
-rw-r--r-- | nixos/lib/make-options-doc/mergeJSON.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/lib/make-options-doc/mergeJSON.py b/nixos/lib/make-options-doc/mergeJSON.py index d7dc6ca30074e..c7577e41e2d24 100644 --- a/nixos/lib/make-options-doc/mergeJSON.py +++ b/nixos/lib/make-options-doc/mergeJSON.py @@ -151,7 +151,7 @@ def p_manpage(md): md.inline.rules.append('manpage') def p_admonition(md): - ADMONITION_PATTERN = re.compile(r'^::: \{([^\n]*?)\}\n(.*?)^:::\n', flags=re.MULTILINE|re.DOTALL) + ADMONITION_PATTERN = re.compile(r'^::: \{([^\n]*?)\}\n(.*?)^:::$\n*', flags=re.MULTILINE|re.DOTALL) def parse(self, m, state): return { 'type': 'admonition', |