Skip to content

Commit 670e473

Browse files
authored
feat: format quarto.version
1 parent c5bde29 commit 670e473

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

_extensions/lua-env/_extension.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
title: lua-env
22
author: Mickaël Canouil
3-
version: 1.0.0
4-
quarto-required: ">=1.2.0"
3+
version: 1.0.1
4+
quarto-required: ">=1.4.459"
55
contributes:
66
shortcodes:
77
- lua-env-shortcode.lua

_extensions/lua-env/lua-env-filter.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--[[
22
# MIT License
33
#
4-
# Copyright (c) Mickaël Canouil
4+
# Copyright (c) 2024 Mickaël Canouil
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal

_extensions/lua-env/lua-env-shortcode.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--[[
22
# MIT License
33
#
4-
# Copyright (c) Mickaël Canouil
4+
# Copyright (c) 2024 Mickaël Canouil
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal
@@ -41,7 +41,11 @@ return {
4141
['lua-env'] = function(args, kwargs, meta)
4242
if #args > 0 then
4343
local var_name = pandoc.utils.stringify(pandoc.Span(args[1]))
44-
return get_value(split(var_name, "."), meta["lua-env"])
44+
if args[1] == "quarto.version" then
45+
return table.concat(get_value(split(var_name, "."), meta["lua-env"]), '.')
46+
else
47+
return get_value(split(var_name, "."), meta["lua-env"])
48+
end
4549
else
4650
return nil
4751
end

0 commit comments

Comments
 (0)