Browse Source

fix: use blank?/1 helper to determine if there is a <base/> element

pull/6/head
Christian Kruse 1 year ago
parent
commit
024e60848a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/microformats2.ex

+ 1
- 1
lib/microformats2.ex View File

@@ -74,7 +74,7 @@ defmodule Microformats2 do
base_element = Floki.find(doc, "base")

new_base =
if base_element == nil or Microformats2.blank?(Floki.attribute(base_element, "href")) do
if blank?(base_element) or blank?(Floki.attribute(base_element, "href")) do
base_url
else
abs_uri(Floki.attribute(base_element, "href") |> List.first(), base_url, [])


Loading…
Cancel
Save