mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-16 06:29:17 +03:00
doc: Add helper for converting DocBook files to Markdown
This commit is contained in:
parent
04b59b0328
commit
da95ab11b4
5 changed files with 230 additions and 1 deletions
12
maintainers/scripts/doc/unknown-code-language.lua
Normal file
12
maintainers/scripts/doc/unknown-code-language.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
--[[
|
||||
Adds “unknown” class to CodeBlock AST nodes without any classes.
|
||||
|
||||
This will cause Pandoc to use fenced code block, which we prefer.
|
||||
]]
|
||||
|
||||
function CodeBlock(elem)
|
||||
if #elem.classes == 0 then
|
||||
elem.classes:insert('unknown')
|
||||
return elem
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue