Skip to content

Commit f797f6c

Browse files
committed
Run mix.format
1 parent 09f239b commit f797f6c

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

lib/schemas.ex

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ defmodule ValueFormatters.Schemas do
7676
type: :string,
7777
default: ", ",
7878
description: "The string used to separate latitude, longitude and radius values."
79+
}
7980
}
80-
}
8181
end
8282
end
8383

@@ -119,7 +119,7 @@ defmodule ValueFormatters.Schemas.Format do
119119
type: :string,
120120
description:
121121
"If the value is an object, the field to extract the formattable entity from."
122-
},
122+
}
123123
},
124124
required: [:format],
125125
additionalProperties: false
@@ -243,7 +243,7 @@ defmodule ValueFormatters.Schemas.Format do
243243
type: :string,
244244
description:
245245
"If the value is an object, the field to extract the formattable entity from."
246-
},
246+
}
247247
},
248248
coordinates_options()
249249
),
@@ -258,8 +258,7 @@ defmodule ValueFormatters.Schemas.Format do
258258
type: :string,
259259
description:
260260
"If the value is an object, the field to extract the formattable entity from."
261-
},
262-
261+
}
263262
},
264263
required: [:field],
265264
additionalProperties: true

lib/value_formatters.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,14 +366,16 @@ defmodule ValueFormatters do
366366
{:ok, lng_formatted} <-
367367
format_number(lng, %{"format" => "number", "precision" => 5}, opts) do
368368
separator = get_in(coordinate_definition, ["separator"]) || ", "
369+
369370
if get_in(coordinate_definition, ["radius_display"]) != false and radius != nil do
370371
with {:ok, radius_formatted} <-
371372
format_number(
372373
radius,
373374
%{"format" => "number", "precision" => 0, "unit" => "m"},
374375
opts
375376
) do
376-
{:ok, "#{lat_formatted}\u{00B0}#{separator}#{lng_formatted}\u{00B0}#{separator}#{radius_formatted}"}
377+
{:ok,
378+
"#{lat_formatted}\u{00B0}#{separator}#{lng_formatted}\u{00B0}#{separator}#{radius_formatted}"}
377379
else
378380
{:error, reason} -> {:error, reason}
379381
end

0 commit comments

Comments
 (0)