lib/isodoc/presentation_function/math.rb in isodoc-2.11.2 vs lib/isodoc/presentation_function/math.rb in isodoc-2.11.3

- old
+ new

@@ -38,9 +38,11 @@ /\.\d/.match?(num) or n.sub!(/\.\d+$/, "") n end def implicit_number_formatter(num, locale) + num.ancestors("formula").empty? or return + ## by default, no formatting in formulas fmt = { significant: num_totaldigits(num.text) }.compact n = normalise_number(num.text) @numfmt.localized_number(n, locale:, format: fmt, precision: num_precision(num.text)) end