Skip to content

Commit

Permalink
Add support for callouts (quarto 1.3)
Browse files Browse the repository at this point in the history
Walk quarto callouts.
Supported only for quarto >= 1.3
  • Loading branch information
ute committed May 31, 2023
1 parent 5d181e1 commit 599bcf0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions _extensions/search-replace/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: Search-replace
author: Ute Hahn
version: 0.3.0
quarto-required: ">=1.2.0"
version: 0.4.0
quarto-required: ">=1.3.0"
contributes:
filters:
- search-replace.lua
Expand Down
12 changes: 9 additions & 3 deletions _extensions/search-replace/search-replace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ return{
{
Meta = function(m)
local abbrdefs = m["search-replace"]
i = 1
local i = 1
for k, v in pairs(m) do
if string.sub(k, 1, 1) == "+" then
abbreviations[k] = v
Expand All @@ -139,9 +139,15 @@ return{
end
return(m)
end
}
} ,

{
Callout = function(call)
call.title = call.title:walk(replace_abbr)
call.content = call.content:walk(replace_abbr)
return(call)
end,

, {
Pandoc = function(doc)
return(pandoc.Pandoc(doc.blocks:walk(replace_abbr), doc.meta))
end
Expand Down

0 comments on commit 599bcf0

Please sign in to comment.