Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat(cli): Allow loading custom inputters from -r option
  • Loading branch information
alerque committed Jul 20, 2022
1 parent 6100740 commit a212e83
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sile.in
Expand Up @@ -99,9 +99,13 @@ if SILE.masterFilename then

for _, path in ipairs(SILE.input.requires) do
local module = require(path)
if type(module) == "table" and type(module.declareOptions) == "function" then
SILE.classes[module._name] = module
SILE.sratch.required_class = module
if type(module) == "table" and module._name then
if module.type == "class" then
SILE.classes[module._name] = module
SILE.sratch.required_class = module
elseif module.type == "inputter" then
SILE.inputters[module._name] = module
end
end
end

Expand Down

0 comments on commit a212e83

Please sign in to comment.