diff --git a/_extensions/lua-env/_extension.yml b/_extensions/lua-env/_extension.yml index e105c07..28a255b 100644 --- a/_extensions/lua-env/_extension.yml +++ b/_extensions/lua-env/_extension.yml @@ -1,7 +1,7 @@ title: lua-env author: Mickaël Canouil -version: 1.0.0 -quarto-required: ">=1.2.0" +version: 1.0.1 +quarto-required: ">=1.4.459" contributes: shortcodes: - lua-env-shortcode.lua diff --git a/_extensions/lua-env/lua-env-filter.lua b/_extensions/lua-env/lua-env-filter.lua index e85ced2..725ef4d 100644 --- a/_extensions/lua-env/lua-env-filter.lua +++ b/_extensions/lua-env/lua-env-filter.lua @@ -1,7 +1,7 @@ --[[ # MIT License # -# Copyright (c) Mickaël Canouil +# Copyright (c) 2024 Mickaël Canouil # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/_extensions/lua-env/lua-env-shortcode.lua b/_extensions/lua-env/lua-env-shortcode.lua index 2d8f89f..7a2f7a4 100644 --- a/_extensions/lua-env/lua-env-shortcode.lua +++ b/_extensions/lua-env/lua-env-shortcode.lua @@ -1,7 +1,7 @@ --[[ # MIT License # -# Copyright (c) Mickaël Canouil +# Copyright (c) 2024 Mickaël Canouil # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -41,7 +41,11 @@ return { ['lua-env'] = function(args, kwargs, meta) if #args > 0 then local var_name = pandoc.utils.stringify(pandoc.Span(args[1])) - return get_value(split(var_name, "."), meta["lua-env"]) + if args[1] == "quarto.version" then + return table.concat(get_value(split(var_name, "."), meta["lua-env"]), '.') + else + return get_value(split(var_name, "."), meta["lua-env"]) + end else return nil end