Browse Source

ref: easier readable code

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

+ 2
- 2
lib/microformats2.ex View File

@@ -63,11 +63,11 @@ defmodule Microformats2 do

cond do
# absolute URI
not Microformats2.blank?(parsed.scheme) ->
not blank?(parsed.scheme) ->
url

# protocol relative URI
Microformats2.blank?(parsed.scheme) and not Microformats2.blank?(parsed.host) ->
blank?(parsed.scheme) and not blank?(parsed.host) ->
URI.to_string(%{parsed | scheme: parsed_base.scheme})

true ->


Loading…
Cancel
Save