Skip to content

Commit 87698cd

Browse files
committed
fix: move Typst annotation require() inside function scope
The bundled main.lua is at exactly 200 top-level locals (the Lua compiler limit). Move the require("modules/typst-code-annotations") from file scope into the code_annotations() function body so it does not add to the top-level local count.
1 parent ae392ad commit 87698cd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/resources/filters/quarto-pre/code-annotation.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
-- Copyright (C) 2020-2022 Posit Software, PBC
33

44
local constants = require("modules/constants")
5-
local typstAnnotations = require("modules/typst-code-annotations")
65

76

87
local hasAnnotations = false
@@ -289,6 +288,8 @@ end
289288
-- The actual filter that will look for a code cell and then
290289
-- find its annotations, then process the subsequent OL
291290
function code_annotations()
291+
local typstAnnotations = require("modules/typst-code-annotations")
292+
292293
-- the localized strings
293294
local language = param("language", nil)
294295

0 commit comments

Comments
 (0)