File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
_extensions/interlinks-experimental
quartodoc/tests/example_interlinks Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ function lookup(search_object)
15
15
local results = {}
16
16
for ii , inventory in ipairs (inventory ) do
17
17
for jj , item in ipairs (inventory .items ) do
18
+ -- e.g. :external+<inv_name>:<domain>:<role>:`<name>`
19
+ if item .inv_name and item .inv_name ~= search_object .inv_name then
20
+ goto continue
21
+ end
22
+
18
23
if item .name ~= search_object .name then
19
24
goto continue
20
25
end
@@ -75,14 +80,23 @@ local function build_search_object(str)
75
80
if starts_with_colon then
76
81
local t = mysplit (str , " :" )
77
82
if # t == 2 then
83
+ -- e.g. :py:func:`my_func`
78
84
search .role = normalize_role (t [1 ])
79
85
search .name = t [2 ]:match (" %%60(.*)%%60" )
80
86
elseif # t == 3 then
87
+ -- e.g. :py:func:`my_func`
81
88
search .domain = t [1 ]
82
89
search .role = normalize_role (t [2 ])
83
90
search .name = t [3 ]:match (" %%60(.*)%%60" )
91
+ elseif # t == 4 then
92
+ -- e.g. :ext+inv:py:func:`my_func`
93
+ search .external = true
94
+
95
+ search .inv_name = t [1 ]:match (" external%+(.*)" )
96
+ search .domain = t [2 ]
97
+ search .role = normalize_role (t [3 ])
98
+ search .name = t [4 ]:match (" %%60(.*)%%60" )
84
99
else
85
- -- TODO: handle external inventory files
86
100
print (" couldn't parse this link: " .. str )
87
101
return {}
88
102
end
Original file line number Diff line number Diff line change @@ -141,9 +141,8 @@ output: [quartodoc.layout](/api/layout.html#quartodoc.layout)
141
141
142
142
## `` [](:external+other:py:function:`quartodoc.get_object`) ``
143
143
144
- NOTE THAT THIS IS A FAILING TEST CASE
145
-
146
- output: ``
144
+ output:
145
+ [ quartodoc.get_object] ( other+api/get_object.html#quartodoc.get_object )
147
146
148
147
█─TestSpecEntry
149
148
├─input = '[](:external+other:py:function:`quartodoc.get_obj ...
You can’t perform that action at this time.
0 commit comments