mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
treewide: attempt at markdown option docs
This commit is contained in:
parent
2f00d7ac51
commit
320aa2a791
17 changed files with 329 additions and 143 deletions
|
@ -280,6 +280,21 @@ rec {
|
|||
if ! isString text then throw "literalDocBook expects a string."
|
||||
else { _type = "literalDocBook"; inherit text; };
|
||||
|
||||
/* Transition marker for documentation that's already migrated to markdown
|
||||
syntax.
|
||||
*/
|
||||
mdDoc = text:
|
||||
if ! isString text then throw "mdDoc expects a string."
|
||||
else { _type = "mdDoc"; inherit text; };
|
||||
|
||||
/* For use in the `defaultText` and `example` option attributes. Causes the
|
||||
given MD text to be inserted verbatim in the documentation, for when
|
||||
a `literalExpression` would be too hard to read.
|
||||
*/
|
||||
literalMD = text:
|
||||
if ! isString text then throw "literalMD expects a string."
|
||||
else { _type = "literalMD"; inherit text; };
|
||||
|
||||
# Helper functions.
|
||||
|
||||
/* Convert an option, described as a list of the option parts in to a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue