nikkomiu / phoenix_inline_svg

Inline SVG module for Phoenix Framework
https://hex.pm/packages/phoenix_inline_svg
MIT License
61 stars 35 forks source link

Floki deprecation: parse the HTML with parse_document or parse_fragment before using attr/4 #32

Open sveredyuk opened 4 years ago

sveredyuk commented 4 years ago

How I can fix this annoying warning message?

warning: deprecation: parse the HTML with parse_document or parse_fragment before using attr/4
  (floki 0.26.0) lib/floki.ex:245: Floki.attr/4
  (phoenix_inline_svg 1.3.1) lib/phoenix_inline_svg/utils.ex:14: anonymous fn/2 in PhoenixInlineSvg.Utils.insert_attrs/2
  (elixir 1.10.2) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3
  (phoenix_inline_svg 1.3.1) lib/phoenix_inline_svg/helpers.ex:156: PhoenixInlineSvg.Helpers.svg_image/4
mrdotb commented 4 years ago

It appear the last version is not on hex.pm yet Meanwhile you can fix the annoying warning using {:phoenix_inline_svg, git: "https://github.com/nikkomiu/phoenix_inline_svg", tag: "b920af17ab568a88b5493cd8d8651ba00e87dc3c"}

abitdodgy commented 4 years ago

You can use github vs git to save some keystrokes.

{:phoenix_inline_svg, github: "nikkomiu/phoenix_inline_svg", tag: "b920af17ab568a88b5493cd8d8651ba00e87dc3c"}