Skip to content

Commit

Permalink
Fix issue #2 with empty title or body in callout
Browse files Browse the repository at this point in the history
  • Loading branch information
ute committed Feb 17, 2024
1 parent af1e692 commit b59b96f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _extensions/search-replace/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
title: Search-replace
author: Ute Hahn
version: 0.4.0
version: 0.4.1
quarto-required: ">=1.3.0"
contributes:
filters:
Expand Down
8 changes: 6 additions & 2 deletions _extensions/search-replace/search-replace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,12 @@ return{

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

Expand Down

0 comments on commit b59b96f

Please sign in to comment.