File tree 1 file changed +13
-5
lines changed 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,17 @@ isrst(md) =
30
30
isa (flatten (md). content[1 ], Markdown. Code) &&
31
31
flatten (md). content[1 ]. language == " rst"
32
32
33
- torst (md) = isrst (md) ? flatten (md). content[1 ]. code : Markdown. rst (md)
33
+ function tryrst (md)
34
+ try
35
+ Markdown. rst (md)
36
+ catch e
37
+ warn (" Error converting docstring:" )
38
+ display (md)
39
+ return
40
+ end
41
+ end
42
+
43
+ torst (md) = isrst (md) ? flatten (md). content[1 ]. code : tryrst (md)
34
44
35
45
function remsig (l, doc)
36
46
sig = l[15 : end ]
@@ -59,10 +69,8 @@ function translate(file)
59
69
func = func. captures[1 ]
60
70
doc = getdoc (mod, func)
61
71
62
- if doc == nothing || ! isrst (doc)
63
- doc == nothing ?
64
- info (" no docs for $(ident (mod, func)) " ) :
65
- info (" can't convert docs for $(ident (mod, func)) " )
72
+ if doc == nothing || torst (doc) == nothing
73
+ info (" no docs for $(ident (mod, func)) " )
66
74
println (io, l)
67
75
doccing = false
68
76
continue
You can’t perform that action at this time.
0 commit comments