mirror of
https://github.com/NixOS/nix
synced 2025-06-24 18:01:16 +02:00
Make doc() return arbitrary Markdown rather than the contents of the "Description" section
Thus we can return the examples section (and any other sections) from doc() and don't need examples() anymore.
This commit is contained in:
parent
0bd060f23a
commit
c3c858ac6d
2 changed files with 21 additions and 7 deletions
|
@ -26,7 +26,7 @@ let
|
|||
+ concatStrings (map ({ description, command }: "${description}\n\n```console\n${command}\n```\n\n") def.examples)
|
||||
else "")
|
||||
+ (if def ? doc
|
||||
then "# Description\n\n" + def.doc + "\n\n"
|
||||
then def.doc + "\n\n"
|
||||
else "")
|
||||
+ (let s = showFlags def.flags; in
|
||||
if s != ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue