Skip to content

Commit

Permalink
fix: bg_colour/colour order issue in PowerPoint format (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanouil authored Oct 18, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 07bc13e commit 31a013b
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _extensions/highlight-text/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
title: Highlight Text
author: Mickaël Canouil
version: 0.4.0
version: 1.0.0
quarto-required: ">=1.4.550"
contributes:
filters:
6 changes: 3 additions & 3 deletions _extensions/highlight-text/highlight-text.lua
Original file line number Diff line number Diff line change
@@ -87,12 +87,12 @@ end

local function highlight_openxml_pptx(span, colour, bg_colour)
local spec = '<a:r><a:rPr dirty="0">'
if bg_colour ~= nil then
spec = spec .. '<a:highlight><a:srgbClr val="' .. bg_colour:gsub("^#", "") .. '" /></a:highlight>'
end
if colour ~= nil then
spec = spec .. '<a:solidFill><a:srgbClr val="' .. colour:gsub("^#", "") .. '" /></a:solidFill>'
end
if bg_colour ~= nil then
spec = spec .. '<a:highlight><a:srgbClr val="' .. bg_colour:gsub("^#", "") .. '" /></a:highlight>'
end
spec = spec .. '</a:rPr><a:t>'

-- table.insert(span.content, 1, pandoc.RawInline('openxml', spec))

0 comments on commit 31a013b

Please sign in to comment.