@@ -228,9 +228,9 @@ defmodule URI do
228
228
@ spec char_unreserved? ( char ) :: boolean
229
229
def char_unreserved? ( char ) when char in 0 .. 0x10ffff do
230
230
char in ?0 .. ?9 or
231
- char in ?a .. ?z or
232
- char in ?A .. ?Z or
233
- char in '~_-.'
231
+ char in ?a .. ?z or
232
+ char in ?A .. ?Z or
233
+ char in '~_-.'
234
234
end
235
235
236
236
@ doc """
@@ -535,10 +535,10 @@ defimpl String.Chars, for: URI do
535
535
authority = extract_authority ( uri )
536
536
537
537
if ( scheme , do: scheme <> ":" , else: "" ) <>
538
- if ( authority , do: "//" <> authority , else: "" ) <>
539
- if ( path , do: path , else: "" ) <>
540
- if ( query , do: "?" <> query , else: "" ) <>
541
- if ( fragment , do: "#" <> fragment , else: "" )
538
+ if ( authority , do: "//" <> authority , else: "" ) <>
539
+ if ( path , do: path , else: "" ) <>
540
+ if ( query , do: "?" <> query , else: "" ) <>
541
+ if ( fragment , do: "#" <> fragment , else: "" )
542
542
end
543
543
544
544
defp extract_authority ( % { host: nil , authority: authority } ) do
@@ -550,7 +550,7 @@ defimpl String.Chars, for: URI do
550
550
# in it only if it's an IPv6 or "IPvFuture" address), so if there's a colon
551
551
# in the host we can safely surround it with [].
552
552
if ( userinfo , do: userinfo <> "@" , else: "" ) <>
553
- if ( String . contains? ( host , ":" ) , do: "[" <> host <> "]" , else: host ) <>
554
- if ( port , do: ":" <> Integer . to_string ( port ) , else: "" )
553
+ if ( String . contains? ( host , ":" ) , do: "[" <> host <> "]" , else: host ) <>
554
+ if ( port , do: ":" <> Integer . to_string ( port ) , else: "" )
555
555
end
556
556
end
0 commit comments