Skip to content

Commit d851060

Browse files
committed
[fix] dictionary input
1 parent 6970e0b commit d851060

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

src/num.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
if type(mantissa) in (int, float) {
9494
mantissa = str(mantissa).replace("", "-")
9595
}
96-
let (sign, int, frac) = parsing.decompose-signed-float-string(mantissa)
96+
let (sign, int, frac) = parsing.decompose-signed-float-numeral(mantissa)
9797
info += (sign: sign, int: int, frac: frac)
9898
}
9999
if "sign" not in info { info.sign = "" }

src/parsing.typ

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
/// Expects a normalized input string (see @number-to-string).
122122
///
123123
/// *Example:*
124-
/// #example(`decompose-unsigned-float-string("9.81")`
124+
/// #example(`decompose-unsigned-float-numeral("9.81")`
125125
///
126126
/// -> (str, str)
127127
#let decompose-unsigned-float-numeral(
@@ -148,7 +148,7 @@
148148
/// Expects a normalized input string (see @number-to-string).
149149
///
150150
/// *Example:*
151-
/// #example(`decompose-signed-float-string("-9.81")`
151+
/// #example(`decompose-signed-float-numeral("-9.81")`
152152
///
153153
/// -> ("+" | "-", str, str)
154154
#let decompose-signed-float-numeral(

tests/num/input-formats/ref.typ

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44

55
$-2.23$ \
66
$-2.23$ \
7-
$-2.23$
7+
$-2.23$ \
8+
$-112.3$ \
9+
$23×10^2$

tests/num/input-formats/test.typ

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44

55
#num[-2.23] \
66
#num(-2.23) \
7-
#num("-2.23")
7+
#num("-2.23") \
8+
#num((mantissa: "-112.3", e: none, pm: none)) \
9+
#num((mantissa: 23, e: "2", pm: none))

0 commit comments

Comments
 (0)