diff --git a/numberformat/proposed.emu b/numberformat/proposed.emu
index 9a19f82..773f5ed 100644
--- a/numberformat/proposed.emu
+++ b/numberformat/proposed.emu
@@ -120,6 +120,7 @@
1. Let _roundingIncrement_ be ? GetNumberOption(_options_, *"roundingIncrement"*, 1, 5000, 1).
1. If _roundingIncrement_ is not in « 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000 », throw a *RangeError* exception.
1. If _roundingIncrement_ is not 1 and _numberFormat_.[[RoundingType]] is not ~fractionDigits~, throw a *RangeError* exception.
+ 1. If _roundingIncrement_ and _numberFormat_.[[MaximumFractionDigits]] is not equal to _numberFormat_.[[MinimumFractionDigits]], throw a *RangeError* exception.
1. Set _numberFormat_.[[RoundingIncrement]] to _roundingIncrement_.
1. Let _trailingZeroDisplay_ be ? GetOption(_options_, *"trailingZeroDisplay"*, *"string"*, « *"auto"*, *"stripIfInteger"* », *"auto"*).
1. Set _numberFormat_.[[TrailingZeroDisplay]] to _trailingZeroDisplay_.
diff --git a/out/numberformat/proposed.html b/out/numberformat/proposed.html
index fbfd206..cce2fdd 100644
--- a/out/numberformat/proposed.html
+++ b/out/numberformat/proposed.html
@@ -976,16 +976,43 @@
emu-val {
font-weight: bold;
}
-emu-alg ol, emu-alg ol ol ol ol {
- list-style-type: decimal;
-}
-
-emu-alg ol ol, emu-alg ol ol ol ol ol {
- list-style-type: lower-alpha;
-}
-emu-alg ol ol ol, ol ol ol ol ol ol {
- list-style-type: lower-roman;
+/* depth 1 */
+emu-alg ol,
+/* depth 4 */
+emu-alg ol ol ol ol,
+emu-alg ol.nested-thrice,
+emu-alg ol.nested-twice ol,
+emu-alg ol.nested-once ol ol {
+ list-style-type: decimal;
+}
+
+/* depth 2 */
+emu-alg ol ol,
+emu-alg ol.nested-once,
+/* depth 5 */
+emu-alg ol ol ol ol ol,
+emu-alg ol.nested-four-times,
+emu-alg ol.nested-thrice ol,
+emu-alg ol.nested-twice ol ol,
+emu-alg ol.nested-once ol ol ol {
+ list-style-type: lower-alpha;
+}
+
+/* depth 3 */
+emu-alg ol ol ol,
+emu-alg ol.nested-twice,
+emu-alg ol.nested-once ol,
+/* depth 6 */
+emu-alg ol ol ol ol ol ol,
+emu-alg ol.nested-lots,
+emu-alg ol.nested-four-times ol,
+emu-alg ol.nested-thrice ol ol,
+emu-alg ol.nested-twice ol ol ol,
+emu-alg ol.nested-once ol ol ol ol,
+/* depth 7+ */
+emu-alg ol.nested-lots ol {
+ list-style-type: lower-roman;
}
emu-eqn {
@@ -1841,7 +1868,7 @@
1.1.2 InitializeNumberFormat ( numberFormat
The following algorithm refers to the type
nonterminal from UTS 35's Unicode Locale Identifier grammar.
- - Let requestedLocales be ? CanonicalizeLocaleList(locales).
- Set options to ? CoerceOptionsToObject(options).
- Let opt be a new Record.
- Let matcher be ? GetOption(options, "localeMatcher", "string", « "lookup", "best fit" », "best fit").
- Set opt.[[localeMatcher]] to matcher.
- Let numberingSystem be ? GetOption(options, "numberingSystem", "string", undefined, undefined).
- If numberingSystem is not undefined, then
- If numberingSystem does not match the Unicode Locale Identifier
type
nonterminal, throw a RangeError exception.
- Set opt.[[nu]] to numberingSystem.
- Let localeData be %NumberFormat%.[[LocaleData]].
- Let r be ResolveLocale(%NumberFormat%.[[AvailableLocales]], requestedLocales, opt, %NumberFormat%.[[RelevantExtensionKeys]], localeData).
- Set numberFormat.[[Locale]] to r.[[locale]].
- Set numberFormat.[[DataLocale]] to r.[[dataLocale]].
- Set numberFormat.[[NumberingSystem]] to r.[[nu]].
- Perform ? SetNumberFormatUnitOptions(numberFormat, options).
- Let style be numberFormat.[[Style]].
- If style is "currency", then
- Let currency be numberFormat.[[Currency]].
- Let cDigits be CurrencyDigits(currency).
- Let mnfdDefault be cDigits.
- Let mxfdDefault be cDigits.
- Else,
- Let mnfdDefault be 0.
- If style is "percent", then
- Let mxfdDefault be 0.
- Else,
- Let mxfdDefault be 3.
- Let notation be ? GetOption(options, "notation", "string", « "standard", "scientific", "engineering", "compact" », "standard").
- Set numberFormat.[[Notation]] to notation.
- Perform ? SetNumberFormatDigitOptions(numberFormat, options, mnfdDefault, mxfdDefault, notation).
- Let roundingIncrement be ? GetNumberOption(options, "roundingIncrement", 1, 5000, 1).
- If roundingIncrement is not in « 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000 », throw a RangeError exception.
- If roundingIncrement is not 1 and numberFormat.[[RoundingType]] is not fractionDigits, throw a RangeError exception.
- Set _numberFormat.[[RoundingIncrement]] to roundingIncrement.
- Let trailingZeroDisplay be ? GetOption(options, "trailingZeroDisplay", "string", « "auto", "stripIfInteger" », "auto").
- Set numberFormat.[[TrailingZeroDisplay]] to trailingZeroDisplay.
- Let compactDisplay be ? GetOption(options, "compactDisplay", "string", « "short", "long" », "short").
- Let defaultUseGrouping be "auto".
- If notation is "compact", then
- Set numberFormat.[[CompactDisplay]] to compactDisplay.
- Set defaultUseGrouping to "min2".
- Let useGrouping be ? GetStringOrBooleanOption(options, "useGrouping", « "min2", "auto", "always" », "always", false, defaultUseGrouping).
- Set numberFormat.[[UseGrouping]] to useGrouping.
- Let signDisplay be ? GetOption(options, "signDisplay", "string", « "auto", "never", "always", "exceptZero", "negative" », "auto").
- Set numberFormat.[[SignDisplay]] to signDisplay.
- Let roundingMode be ? GetOption(options, "roundingMode", "string", « "ceil", "floor", "expand", "trunc", "halfCeil", "halfFloor", "halfExpand", "halfTrunc", "halfEven" », "halfExpand").
- Set numberFormat.[[RoundingMode]] to roundingMode.
- Return numberFormat.
+ - Let requestedLocales be ? CanonicalizeLocaleList(locales).
- Set options to ? CoerceOptionsToObject(options).
- Let opt be a new Record.
- Let matcher be ? GetOption(options, "localeMatcher", "string", « "lookup", "best fit" », "best fit").
- Set opt.[[localeMatcher]] to matcher.
- Let numberingSystem be ? GetOption(options, "numberingSystem", "string", undefined, undefined).
- If numberingSystem is not undefined, then
- If numberingSystem does not match the Unicode Locale Identifier
type
nonterminal, throw a RangeError exception.
- Set opt.[[nu]] to numberingSystem.
- Let localeData be %NumberFormat%.[[LocaleData]].
- Let r be ResolveLocale(%NumberFormat%.[[AvailableLocales]], requestedLocales, opt, %NumberFormat%.[[RelevantExtensionKeys]], localeData).
- Set numberFormat.[[Locale]] to r.[[locale]].
- Set numberFormat.[[DataLocale]] to r.[[dataLocale]].
- Set numberFormat.[[NumberingSystem]] to r.[[nu]].
- Perform ? SetNumberFormatUnitOptions(numberFormat, options).
- Let style be numberFormat.[[Style]].
- If style is "currency", then
- Let currency be numberFormat.[[Currency]].
- Let cDigits be CurrencyDigits(currency).
- Let mnfdDefault be cDigits.
- Let mxfdDefault be cDigits.
- Else,
- Let mnfdDefault be 0.
- If style is "percent", then
- Let mxfdDefault be 0.
- Else,
- Let mxfdDefault be 3.
- Let notation be ? GetOption(options, "notation", "string", « "standard", "scientific", "engineering", "compact" », "standard").
- Set numberFormat.[[Notation]] to notation.
- Perform ? SetNumberFormatDigitOptions(numberFormat, options, mnfdDefault, mxfdDefault, notation).
- Let roundingIncrement be ? GetNumberOption(options, "roundingIncrement", 1, 5000, 1).
- If roundingIncrement is not in « 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000 », throw a RangeError exception.
- If roundingIncrement is not 1 and numberFormat.[[RoundingType]] is not fractionDigits, throw a RangeError exception.
- If roundingIncrement and numberFormat.[[MaximumFractionDigits]] is not equal to numberFormat.[[MinimumFractionDigits]], throw a RangeError exception.
- Set numberFormat.[[RoundingIncrement]] to roundingIncrement.
- Let trailingZeroDisplay be ? GetOption(options, "trailingZeroDisplay", "string", « "auto", "stripIfInteger" », "auto").
- Set numberFormat.[[TrailingZeroDisplay]] to trailingZeroDisplay.
- Let compactDisplay be ? GetOption(options, "compactDisplay", "string", « "short", "long" », "short").
- Let defaultUseGrouping be "auto".
- If notation is "compact", then
- Set numberFormat.[[CompactDisplay]] to compactDisplay.
- Set defaultUseGrouping to "min2".
- Let useGrouping be ? GetStringOrBooleanOption(options, "useGrouping", « "min2", "auto", "always" », "always", false, defaultUseGrouping).
- Set numberFormat.[[UseGrouping]] to useGrouping.
- Let signDisplay be ? GetOption(options, "signDisplay", "string", « "auto", "never", "always", "exceptZero", "negative" », "auto").
- Set numberFormat.[[SignDisplay]] to signDisplay.
- Let roundingMode be ? GetOption(options, "roundingMode", "string", « "ceil", "floor", "expand", "trunc", "halfCeil", "halfFloor", "halfExpand", "halfTrunc", "halfEven" », "halfExpand").
- Set numberFormat.[[RoundingMode]] to roundingMode.
- Return numberFormat.