Skip to content

Commit c281eb2

Browse files
committed
fix?: Allow templates to use import()
1 parent 79f96d0 commit c281eb2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

config.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ postprocess_html = function(html, module)
3535
end
3636

3737
-- Silly hack to allow template file to access import
38-
import("setmetatable")(ldoc, {__index = function(_, k) if k == "import" then return import end end})
38+
import("setmetatable")(import("ldoc"), {__index = function(_, k) if k == "import" then return import end end})

ldoc.ltp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# local a_name, b_name = display_name(a):lower(), display_name(b):lower()
1717
#
1818
# if a_name == "globals" then return true end
19-
# if b_name == "globals" then return false end
19+
# if b_name == "globals" then return false end
2020
#
2121
# return a_name < b_name
2222
# end)

0 commit comments

Comments
 (0)