Skip to content

Commit

Permalink
support booleans in shortcode meta
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Aug 15, 2022
1 parent d1c4ab0 commit 912d535
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/changelog-1.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@

- Properly copy `format-resources` for HTML based formats
- Extension YAML files `_extension.yml` are now validated at render time. (#1268)
- Support boolean values in Shortcode `meta` access

## Publishing

Expand Down
2 changes: 2 additions & 0 deletions src/resources/filters/quarto-pre/shortcodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ local function readMetadata(value)
warn("Unsupported type '" .. pandoc.utils.type(metaValue) .. "' for key " .. value)
return pandoc.Inlines({})
end
elseif type(metaValue) == "boolean" then
return metaValue
else
return pandoc.Inlines({ pandoc.Str( tostring(val) ) })
end
Expand Down

0 comments on commit 912d535

Please sign in to comment.