Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into feature...
[akkoma] / lib / xml_builder.ex
index c6d1449036705084f785c056b3dfce32f0ee703e..88f8ce2a37a0ca7f54bcc71e2e4f4588a95675db 100644 (file)
@@ -23,7 +23,7 @@ defmodule Pleroma.XmlBuilder do
     for element <- content do
       to_xml(element)
     end
-    |> Enum.join
+    |> Enum.join()
   end
 
   def to_xml(%NaiveDateTime{} = time) do
@@ -33,10 +33,12 @@ defmodule Pleroma.XmlBuilder do
   def to_doc(content), do: ~s(<?xml version="1.0" encoding="UTF-8"?>) <> to_xml(content)
 
   defp make_open_tag(tag, attributes) do
-    attributes_string = for {attribute, value} <- attributes do
-      "#{attribute}=\"#{value}\""
-    end |> Enum.join(" ")
+    attributes_string =
+      for {attribute, value} <- attributes do
+        "#{attribute}=\"#{value}\""
+      end
+      |> Enum.join(" ")
 
-    [tag, attributes_string] |> Enum.join(" ") |> String.strip
+    [tag, attributes_string] |> Enum.join(" ") |> String.trim()
   end
 end