Skip to content

Commit d76c670

Browse files
committed
util: generate_man - Split processDovecoMd to pre and post
1 parent c4dc23e commit d76c670

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

util/generate_man.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const doInclude = (content, includes, f) => {
5656
return result
5757
}
5858

59-
const processDovecotMd = () => {
59+
const processDovecotMdPost = () => {
6060
return tree => {
6161
/* Convert definition lists to base mdast elements that remark-man
6262
* can handle. */
@@ -88,7 +88,11 @@ const processDovecotMd = () => {
8888

8989
node.node.children = [ u('blockquote', node.children) ]
9090
})
91+
}
92+
}
9193

94+
const processDovecotMdPre = () => {
95+
return tree => {
9296
/* Go through and replace Dovecot markdown items with man-friendly
9397
* textual equivalents. */
9498
return map(tree, (node) => {
@@ -151,9 +155,10 @@ const main = async (component, outPath) => {
151155
continue
152156

153157
await unified().
158+
use(processDovecotMdPre).
154159
use(remarkParse).
155160
use(remarkDeflist).
156-
use(processDovecotMd).
161+
use(processDovecotMdPost).
157162
use(remarkMan, {
158163
manual: 'Dovecot',
159164
version: gitHash,

0 commit comments

Comments
 (0)