Skip to content

Commit

Permalink
Simplify parsed compression option
Browse files Browse the repository at this point in the history
Now that options are normalised before hashing, we can always set this
option.
  • Loading branch information
camelpunch committed Jan 4, 2025
1 parent 24c1116 commit 5c4ba54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mudbrick/parser.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ defmodule Mudbrick.Parser do
images = decompressed_resources_option(image_files, "I")
compress? = Enum.any?(items, &match?(%{value: %{compress: true}}, &1))

opts = if compress?, do: [compress: true], else: []
opts = [compress: compress?]
opts = if map_size(fonts) > 0, do: Keyword.put(opts, :fonts, fonts), else: opts
opts = if map_size(images) > 0, do: Keyword.put(opts, :images, images), else: opts

Expand Down

0 comments on commit 5c4ba54

Please sign in to comment.