Skip to content

Commit

Permalink
Remove unnecessary conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
rich-iannone committed Oct 19, 2023
1 parent 74a0184 commit 05b36f8
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/resources/filters/quarto-post/email.lua
Original file line number Diff line number Diff line change
Expand Up @@ -331,20 +331,18 @@ function process_document(doc)
local image_data = nil

for cid, img in pairs(image_tbl) do
if (true) then

local image_file = io.open(img, "rb")
local image_file = io.open(img, "rb")

if type(image_file) == "userdata" then
image_data = image_file:read("*all")
image_file:close()
end
if type(image_file) == "userdata" then
image_data = image_file:read("*all")
image_file:close()
end

local encoded_data = quarto.base64.encode(image_data)
local encoded_data = quarto.base64.encode(image_data)

-- Insert `encoded_data` into `email_images` table with prepared key
email_images[cid] = encoded_data
end
-- Insert `encoded_data` into `email_images` table with prepared key
email_images[cid] = encoded_data
end

-- Encode all of the strings and tables of strings into the JSON file
Expand Down

0 comments on commit 05b36f8

Please sign in to comment.