Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion _extensions/fontawesome/fontawesome.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ return {
if not isEmpty(title) then
title = " title=\"" .. title .. "\""
end

local color = pandoc.utils.stringify(kwargs["color"])
if not isEmpty(color) then
color = " style=\"color:" .. color .. "\""
end

local size = pandoc.utils.stringify(kwargs["size"])

Expand All @@ -60,7 +65,7 @@ return {
end
return pandoc.RawInline(
'html',
"<i class=\"fa-" .. group .. " fa-" .. icon .. size .. "\"" .. title .. " aria-hidden=\"true\"></i>"
"<i class=\"fa-" .. group .. " fa-" .. icon .. size .. "\"" .. title .. color .. " aria-hidden=\"true\"></i>"
)
-- detect pdf / beamer / latex / etc
elseif quarto.doc.isFormat("pdf") then
Expand Down