File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 2
2
gitpython
3
3
linkify-it-py
4
4
lxd-sphinx-extensions
5
- myst-parser < 3.0.0
5
+ myst-parser
6
6
pyspelling
7
7
sphinx
8
8
sphinx-autobuild
Original file line number Diff line number Diff line change 53
53
54
54
with open (os .path .join ('.sphinx/deps/manpages/' , pagepath ), 'w' ) as mdfile :
55
55
mdfile .write ('(' + page + ')=\n ' )
56
+ line_block = False
56
57
for line in content :
57
58
if line .startswith ('###### Auto generated' ):
58
59
continue
60
+ elif line .startswith ('### Synopsis' ):
61
+ mdfile .write ('## Synopsis\n ' )
62
+ mdfile .write ('```{line-block}\n ' )
63
+ line_block = True
59
64
elif line .startswith ('## ' ):
60
65
mdfile .write ('# `' + line [3 :].rstrip () + '`\n ' )
66
+ elif line .startswith ('```' ):
67
+ if line_block :
68
+ mdfile .write ('```\n ' )
69
+ line_block = False
70
+ mdfile .write (line )
61
71
elif line .startswith ('##' ):
72
+ if line_block :
73
+ mdfile .write ('```\n ' )
74
+ line_block = False
62
75
mdfile .write (line [1 :])
63
76
else :
64
77
mdfile .write (line )
You can’t perform that action at this time.
0 commit comments