Skip to content

Commit

Permalink
replace-formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Lemmens committed Jun 16, 2024
1 parent 0394be3 commit 153269f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion AbstractXsdTypes.jl/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ authors = ["Tom Lemmens", "Matthijs Cox"]
version = "0.1.0"

[deps]
Formatting = "59287772-0a20-5a39-b81b-1366585eb4c0"
Format = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8"
Memoization = "6fafb56a-5788-4b4e-91ca-c0cea6611c73"
2 changes: 1 addition & 1 deletion AbstractXsdTypes.jl/src/AbstractXsdTypes.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module AbstractXsdTypes

using Memoization
using Formatting
using Format

include("type_definitions.jl")
include("construction_and_conversion_functions.jl")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ end

# format into string and parse back, if these are equal we are ok
max_fraction_digits = get_max_fraction_digits(T)
value_string = sprintf1("%.$(max_fraction_digits)f", value)
value_string = cfmt("%.$(max_fraction_digits)f", value)

if parse(S, value_string) != value
throw(
Expand Down
1 change: 0 additions & 1 deletion XmlStructWriter.jl/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ version = "0.1.0"

[deps]
AbstractXsdTypes = "1d4aff4b-e088-40cb-b713-ffe4caf1580b"
Formatting = "59287772-0a20-5a39-b81b-1366585eb4c0"
LightXML = "9c8b4983-aa76-5018-a973-4c85ecc9e179"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
TimeZones = "f269a46b-ccf7-5d73-abea-4c690281aa53"
4 changes: 2 additions & 2 deletions XmlStructWriter.jl/src/XmlStructWriter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module XmlStructWriter
using LightXML
using TimeZones
using Printf
using Formatting
using Format
using AbstractXsdTypes

export write_xml
Expand Down Expand Up @@ -149,7 +149,7 @@ function generate_xml_string(xml_object::AbstractXsdTypes.AbstractXSDFloat)::Str
@debug "Generating XML string from $xml_object"
if AbstractXsdTypes.fraction_digits_check in AbstractXsdTypes.get_restriction_checks(typeof(xml_object))
max_fraction_digits = AbstractXsdTypes.get_max_fraction_digits(typeof(xml_object))
xml_object = sprintf1("%.$(max_fraction_digits)f", xml_object)
xml_object = cfmt("%.$(max_fraction_digits)f", xml_object)
else
xml_object = @sprintf("%f", xml_object)
end
Expand Down

0 comments on commit 153269f

Please sign in to comment.