From adfc4a18a20dac361e960e6be675a9842a5a502a Mon Sep 17 00:00:00 2001 From: Ben Allen Date: Wed, 7 Aug 2024 12:03:16 -0700 Subject: [PATCH] Bugfix: Display negative sign on leading numeric-style zeroes (#207) --- index.html | 26 +++++++++++++------------- spec.emu | 6 ++++++ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index b0f6771..e4f7596 100644 --- a/index.html +++ b/index.html @@ -1420,7 +1420,7 @@ }); let sdoMap = JSON.parse(`{}`); -let biblio = JSON.parse(`{"refsByClause":{"sec-duration-records":["_ref_0","_ref_5"],"sec-addfractionaldigits":["_ref_1","_ref_25"],"sec-partitiondurationformatpattern":["_ref_2","_ref_34","_ref_35","_ref_36","_ref_37","_ref_38","_ref_39","_ref_40"],"sec-Intl.DurationFormat":["_ref_3","_ref_41","_ref_42","_ref_43","_ref_44"],"sec-Intl.DurationFormat.prototype.resolvedOptions":["_ref_4"],"sec-todurationrecord":["_ref_6","_ref_7","_ref_8","_ref_9","_ref_10","_ref_11","_ref_12","_ref_13","_ref_14","_ref_15","_ref_16","_ref_17","_ref_18","_ref_19"],"sec-isvalidduration":["_ref_20","_ref_21","_ref_22","_ref_23","_ref_24"],"sec-formatnumerichours":["_ref_26"],"sec-formatnumericminutes":["_ref_27"],"sec-formatnumericseconds":["_ref_28"],"sec-formatnumericunits":["_ref_29","_ref_30","_ref_31","_ref_32","_ref_33"],"sec-Intl.DurationFormat.prototype":["_ref_45"],"sec-Intl.DurationFormat.supportedLocalesOf":["_ref_46"],"sec-Intl.DurationFormat.prototype.constructor":["_ref_47"],"sec-Intl.DurationFormat.prototype.format":["_ref_48","_ref_49"],"sec-Intl.DurationFormat.prototype.formatToParts":["_ref_50","_ref_51"],"sec-properties-of-intl-durationformat-instances":["_ref_52"]},"entries":[{"type":"term","term":"Duration Record","refId":"sec-duration-records"},{"type":"table","id":"table-duration-record-fields","number":1,"caption":"Table 1: Duration Record Fields","referencingIds":["_ref_0"]},{"type":"clause","id":"sec-duration-records","titleHTML":"Duration Records","number":"1.1.1","referencingIds":["_ref_5","_ref_6","_ref_7","_ref_8","_ref_20","_ref_25","_ref_26","_ref_27","_ref_28","_ref_29","_ref_34"]},{"type":"op","aoid":"ToIntegerIfIntegral","refId":"sec-tointegerifintegral"},{"type":"clause","id":"sec-tointegerifintegral","title":"ToIntegerIfIntegral ( argument )","titleHTML":"ToIntegerIfIntegral ( argument )","number":"1.1.2","referencingIds":["_ref_9","_ref_10","_ref_11","_ref_12","_ref_13","_ref_14","_ref_15","_ref_16","_ref_17","_ref_18","_ref_22"]},{"type":"op","aoid":"ToDurationRecord","refId":"sec-todurationrecord"},{"type":"clause","id":"sec-todurationrecord","title":"ToDurationRecord ( input )","titleHTML":"ToDurationRecord ( input )","number":"1.1.3","referencingIds":["_ref_23","_ref_48","_ref_50"]},{"type":"op","aoid":"DurationSign","refId":"sec-durationsign"},{"type":"clause","id":"sec-durationsign","title":"DurationSign ( years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds )","titleHTML":"DurationSign ( years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds )","number":"1.1.4","referencingIds":["_ref_21","_ref_24","_ref_38"]},{"type":"op","aoid":"IsValidDuration","refId":"sec-isvalidduration"},{"type":"clause","id":"sec-isvalidduration","title":"IsValidDuration ( years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds )","titleHTML":"IsValidDuration ( years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds )","number":"1.1.5","referencingIds":["_ref_19"]},{"type":"op","aoid":"GetDurationUnitOptions","refId":"sec-getdurationunitoptions"},{"type":"clause","id":"sec-getdurationunitoptions","title":"GetDurationUnitOptions ( unit, options, baseStyle, stylesList, digitalBase, prevStyle, twoDigitHours )","titleHTML":"GetDurationUnitOptions ( unit, options, baseStyle, stylesList, digitalBase, prevStyle, twoDigitHours )","number":"1.1.6","referencingIds":["_ref_44"]},{"type":"op","aoid":"AddFractionalDigits","refId":"sec-addfractionaldigits"},{"type":"clause","id":"sec-addfractionaldigits","title":"AddFractionalDigits ( durationFormat, duration )","titleHTML":"AddFractionalDigits ( durationFormat, duration )","number":"1.1.7","referencingIds":["_ref_30","_ref_37"]},{"type":"op","aoid":"NextUnitFractional","refId":"sec-nextunitfractional"},{"type":"clause","id":"sec-nextunitfractional","title":"NextUnitFractional ( durationFormat, unit )","titleHTML":"NextUnitFractional ( durationFormat, unit )","number":"1.1.8","referencingIds":["_ref_36"]},{"type":"op","aoid":"FormatNumericHours","refId":"sec-formatnumerichours"},{"type":"clause","id":"sec-formatnumerichours","title":"FormatNumericHours ( durationFormat, hoursValue, signDisplayed )","titleHTML":"FormatNumericHours ( durationFormat, hoursValue, signDisplayed )","number":"1.1.9","referencingIds":["_ref_31"]},{"type":"op","aoid":"FormatNumericMinutes","refId":"sec-formatnumericminutes"},{"type":"clause","id":"sec-formatnumericminutes","title":"FormatNumericMinutes ( durationFormat, minutesValue, hoursDisplayed, signDisplayed )","titleHTML":"FormatNumericMinutes ( durationFormat, minutesValue, hoursDisplayed, signDisplayed )","number":"1.1.10","referencingIds":["_ref_32"]},{"type":"op","aoid":"FormatNumericSeconds","refId":"sec-formatnumericseconds"},{"type":"clause","id":"sec-formatnumericseconds","title":"FormatNumericSeconds ( durationFormat, secondsValue, minutesDisplayed, signDisplayed )","titleHTML":"FormatNumericSeconds ( durationFormat, secondsValue, minutesDisplayed, signDisplayed )","number":"1.1.11","referencingIds":["_ref_33"]},{"type":"op","aoid":"FormatNumericUnits","refId":"sec-formatnumericunits"},{"type":"clause","id":"sec-formatnumericunits","title":"FormatNumericUnits ( durationFormat, duration, firstNumericUnit, signDisplayed )","titleHTML":"FormatNumericUnits ( durationFormat, duration, firstNumericUnit, signDisplayed )","number":"1.1.12","referencingIds":["_ref_35"]},{"type":"op","aoid":"ListFormatParts","refId":"sec-listformatparts"},{"type":"clause","id":"sec-listformatparts","title":"ListFormatParts ( durationFormat, partitionedPartsList )","titleHTML":"ListFormatParts ( durationFormat, partitionedPartsList )","number":"1.1.13","referencingIds":["_ref_39"]},{"type":"table","id":"table-partition-duration-format-pattern","number":2,"caption":"Table 2: DurationFormat instance internal slots and properties relevant to PartitionDurationFormatPattern","referencingIds":["_ref_1","_ref_2"]},{"type":"op","aoid":"PartitionDurationFormatPattern","refId":"sec-partitiondurationformatpattern"},{"type":"clause","id":"sec-partitiondurationformatpattern","title":"PartitionDurationFormatPattern ( durationFormat, duration )","titleHTML":"PartitionDurationFormatPattern ( durationFormat, duration )","number":"1.1.14","referencingIds":["_ref_40","_ref_49","_ref_51"]},{"type":"clause","id":"sec-intl-durationformat-abstracts","titleHTML":"Abstract Operations for DurationFormat Objects","number":"1.1"},{"type":"term","term":"%DurationFormat%","refId":"sec-intl-durationformat-constructor"},{"type":"table","id":"table-durationformat","number":3,"caption":"Table 3: Internal slots and property names of DurationFormat instances relevant to Intl.DurationFormat constructor","referencingIds":["_ref_3"]},{"type":"clause","id":"sec-Intl.DurationFormat","title":"Intl.DurationFormat ( [ locales [ , options ] ] )","titleHTML":"Intl.DurationFormat ( [ locales [ , options ] ] )","number":"1.2.1"},{"type":"clause","id":"sec-intl-durationformat-constructor","titleHTML":"The Intl.DurationFormat Constructor","number":"1.2","referencingIds":["_ref_41","_ref_42","_ref_43","_ref_46","_ref_47"]},{"type":"clause","id":"sec-Intl.DurationFormat.prototype","titleHTML":"Intl.DurationFormat.prototype","number":"1.3.1"},{"type":"clause","id":"sec-Intl.DurationFormat.supportedLocalesOf","title":"Intl.DurationFormat.supportedLocalesOf ( locales [ , options ] )","titleHTML":"Intl.DurationFormat.supportedLocalesOf ( locales [ , options ] )","number":"1.3.2"},{"type":"clause","id":"sec-Intl.DurationFormat-internal-slots","titleHTML":"Internal slots","number":"1.3.3"},{"type":"clause","id":"sec-properties-of-intl-durationformat-constructor","titleHTML":"Properties of the Intl.DurationFormat Constructor","number":"1.3"},{"type":"term","term":"%DurationFormatPrototype%","refId":"sec-properties-of-intl-durationformat-prototype-object"},{"type":"clause","id":"sec-Intl.DurationFormat.prototype.constructor","titleHTML":"Intl.DurationFormat.prototype.constructor","number":"1.4.1"},{"type":"clause","id":"sec-Intl.DurationFormat.prototype-@@tostringtag","titleHTML":"Intl.DurationFormat.prototype [ @@toStringTag ]","number":"1.4.2"},{"type":"clause","id":"sec-Intl.DurationFormat.prototype.format","title":"Intl.DurationFormat.prototype.format ( duration )","titleHTML":"Intl.DurationFormat.prototype.format ( duration )","number":"1.4.3"},{"type":"clause","id":"sec-Intl.DurationFormat.prototype.formatToParts","title":"Intl.DurationFormat.prototype.formatToParts ( duration )","titleHTML":"Intl.DurationFormat.prototype.formatToParts ( duration )","number":"1.4.4"},{"type":"table","id":"table-durationformat-resolvedoptions-properties","number":4,"caption":"Table 4: Resolved Options of DurationFormat Instances","referencingIds":["_ref_4"]},{"type":"clause","id":"sec-Intl.DurationFormat.prototype.resolvedOptions","titleHTML":"Intl.DurationFormat.prototype.resolvedOptions ( )","number":"1.4.5"},{"type":"clause","id":"sec-properties-of-intl-durationformat-prototype-object","titleHTML":"Properties of the Intl.DurationFormat Prototype Object","number":"1.4","referencingIds":["_ref_45","_ref_52"]},{"type":"clause","id":"sec-properties-of-intl-durationformat-instances","titleHTML":"Properties of Intl.DurationFormat Instances","number":"1.5"},{"type":"clause","id":"durationformat-objects","titleHTML":"DurationFormat Objects","number":"1"},{"type":"clause","id":"sec-copyright-and-software-license","title":"Copyright & Software License","titleHTML":"Copyright & Software License","number":"A"}]}`); +let biblio = JSON.parse(`{"refsByClause":{"sec-duration-records":["_ref_0","_ref_5"],"sec-addfractionaldigits":["_ref_1","_ref_25"],"sec-partitiondurationformatpattern":["_ref_2","_ref_36","_ref_37","_ref_38","_ref_39","_ref_40","_ref_41","_ref_42"],"sec-Intl.DurationFormat":["_ref_3","_ref_43","_ref_44","_ref_45","_ref_46"],"sec-Intl.DurationFormat.prototype.resolvedOptions":["_ref_4"],"sec-todurationrecord":["_ref_6","_ref_7","_ref_8","_ref_9","_ref_10","_ref_11","_ref_12","_ref_13","_ref_14","_ref_15","_ref_16","_ref_17","_ref_18","_ref_19"],"sec-isvalidduration":["_ref_20","_ref_21","_ref_22","_ref_23","_ref_24"],"sec-formatnumerichours":["_ref_26"],"sec-formatnumericminutes":["_ref_27"],"sec-formatnumericseconds":["_ref_28"],"sec-formatnumericunits":["_ref_29","_ref_30","_ref_31","_ref_32","_ref_33","_ref_34","_ref_35"],"sec-Intl.DurationFormat.prototype":["_ref_47"],"sec-Intl.DurationFormat.supportedLocalesOf":["_ref_48"],"sec-Intl.DurationFormat.prototype.constructor":["_ref_49"],"sec-Intl.DurationFormat.prototype.format":["_ref_50","_ref_51"],"sec-Intl.DurationFormat.prototype.formatToParts":["_ref_52","_ref_53"],"sec-properties-of-intl-durationformat-instances":["_ref_54"]},"entries":[{"type":"term","term":"Duration Record","refId":"sec-duration-records"},{"type":"table","id":"table-duration-record-fields","number":1,"caption":"Table 1: Duration Record Fields","referencingIds":["_ref_0"]},{"type":"clause","id":"sec-duration-records","titleHTML":"Duration Records","number":"1.1.1","referencingIds":["_ref_5","_ref_6","_ref_7","_ref_8","_ref_20","_ref_25","_ref_26","_ref_27","_ref_28","_ref_29","_ref_36"]},{"type":"op","aoid":"ToIntegerIfIntegral","refId":"sec-tointegerifintegral"},{"type":"clause","id":"sec-tointegerifintegral","title":"ToIntegerIfIntegral ( argument )","titleHTML":"ToIntegerIfIntegral ( argument )","number":"1.1.2","referencingIds":["_ref_9","_ref_10","_ref_11","_ref_12","_ref_13","_ref_14","_ref_15","_ref_16","_ref_17","_ref_18","_ref_22"]},{"type":"op","aoid":"ToDurationRecord","refId":"sec-todurationrecord"},{"type":"clause","id":"sec-todurationrecord","title":"ToDurationRecord ( input )","titleHTML":"ToDurationRecord ( input )","number":"1.1.3","referencingIds":["_ref_23","_ref_50","_ref_52"]},{"type":"op","aoid":"DurationSign","refId":"sec-durationsign"},{"type":"clause","id":"sec-durationsign","title":"DurationSign ( years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds )","titleHTML":"DurationSign ( years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds )","number":"1.1.4","referencingIds":["_ref_21","_ref_24","_ref_31","_ref_33","_ref_40"]},{"type":"op","aoid":"IsValidDuration","refId":"sec-isvalidduration"},{"type":"clause","id":"sec-isvalidduration","title":"IsValidDuration ( years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds )","titleHTML":"IsValidDuration ( years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds )","number":"1.1.5","referencingIds":["_ref_19"]},{"type":"op","aoid":"GetDurationUnitOptions","refId":"sec-getdurationunitoptions"},{"type":"clause","id":"sec-getdurationunitoptions","title":"GetDurationUnitOptions ( unit, options, baseStyle, stylesList, digitalBase, prevStyle, twoDigitHours )","titleHTML":"GetDurationUnitOptions ( unit, options, baseStyle, stylesList, digitalBase, prevStyle, twoDigitHours )","number":"1.1.6","referencingIds":["_ref_46"]},{"type":"op","aoid":"AddFractionalDigits","refId":"sec-addfractionaldigits"},{"type":"clause","id":"sec-addfractionaldigits","title":"AddFractionalDigits ( durationFormat, duration )","titleHTML":"AddFractionalDigits ( durationFormat, duration )","number":"1.1.7","referencingIds":["_ref_30","_ref_39"]},{"type":"op","aoid":"NextUnitFractional","refId":"sec-nextunitfractional"},{"type":"clause","id":"sec-nextunitfractional","title":"NextUnitFractional ( durationFormat, unit )","titleHTML":"NextUnitFractional ( durationFormat, unit )","number":"1.1.8","referencingIds":["_ref_38"]},{"type":"op","aoid":"FormatNumericHours","refId":"sec-formatnumerichours"},{"type":"clause","id":"sec-formatnumerichours","title":"FormatNumericHours ( durationFormat, hoursValue, signDisplayed )","titleHTML":"FormatNumericHours ( durationFormat, hoursValue, signDisplayed )","number":"1.1.9","referencingIds":["_ref_32"]},{"type":"op","aoid":"FormatNumericMinutes","refId":"sec-formatnumericminutes"},{"type":"clause","id":"sec-formatnumericminutes","title":"FormatNumericMinutes ( durationFormat, minutesValue, hoursDisplayed, signDisplayed )","titleHTML":"FormatNumericMinutes ( durationFormat, minutesValue, hoursDisplayed, signDisplayed )","number":"1.1.10","referencingIds":["_ref_34"]},{"type":"op","aoid":"FormatNumericSeconds","refId":"sec-formatnumericseconds"},{"type":"clause","id":"sec-formatnumericseconds","title":"FormatNumericSeconds ( durationFormat, secondsValue, minutesDisplayed, signDisplayed )","titleHTML":"FormatNumericSeconds ( durationFormat, secondsValue, minutesDisplayed, signDisplayed )","number":"1.1.11","referencingIds":["_ref_35"]},{"type":"op","aoid":"FormatNumericUnits","refId":"sec-formatnumericunits"},{"type":"clause","id":"sec-formatnumericunits","title":"FormatNumericUnits ( durationFormat, duration, firstNumericUnit, signDisplayed )","titleHTML":"FormatNumericUnits ( durationFormat, duration, firstNumericUnit, signDisplayed )","number":"1.1.12","referencingIds":["_ref_37"]},{"type":"op","aoid":"ListFormatParts","refId":"sec-listformatparts"},{"type":"clause","id":"sec-listformatparts","title":"ListFormatParts ( durationFormat, partitionedPartsList )","titleHTML":"ListFormatParts ( durationFormat, partitionedPartsList )","number":"1.1.13","referencingIds":["_ref_41"]},{"type":"table","id":"table-partition-duration-format-pattern","number":2,"caption":"Table 2: DurationFormat instance internal slots and properties relevant to PartitionDurationFormatPattern","referencingIds":["_ref_1","_ref_2"]},{"type":"op","aoid":"PartitionDurationFormatPattern","refId":"sec-partitiondurationformatpattern"},{"type":"clause","id":"sec-partitiondurationformatpattern","title":"PartitionDurationFormatPattern ( durationFormat, duration )","titleHTML":"PartitionDurationFormatPattern ( durationFormat, duration )","number":"1.1.14","referencingIds":["_ref_42","_ref_51","_ref_53"]},{"type":"clause","id":"sec-intl-durationformat-abstracts","titleHTML":"Abstract Operations for DurationFormat Objects","number":"1.1"},{"type":"term","term":"%DurationFormat%","refId":"sec-intl-durationformat-constructor"},{"type":"table","id":"table-durationformat","number":3,"caption":"Table 3: Internal slots and property names of DurationFormat instances relevant to Intl.DurationFormat constructor","referencingIds":["_ref_3"]},{"type":"clause","id":"sec-Intl.DurationFormat","title":"Intl.DurationFormat ( [ locales [ , options ] ] )","titleHTML":"Intl.DurationFormat ( [ locales [ , options ] ] )","number":"1.2.1"},{"type":"clause","id":"sec-intl-durationformat-constructor","titleHTML":"The Intl.DurationFormat Constructor","number":"1.2","referencingIds":["_ref_43","_ref_44","_ref_45","_ref_48","_ref_49"]},{"type":"clause","id":"sec-Intl.DurationFormat.prototype","titleHTML":"Intl.DurationFormat.prototype","number":"1.3.1"},{"type":"clause","id":"sec-Intl.DurationFormat.supportedLocalesOf","title":"Intl.DurationFormat.supportedLocalesOf ( locales [ , options ] )","titleHTML":"Intl.DurationFormat.supportedLocalesOf ( locales [ , options ] )","number":"1.3.2"},{"type":"clause","id":"sec-Intl.DurationFormat-internal-slots","titleHTML":"Internal slots","number":"1.3.3"},{"type":"clause","id":"sec-properties-of-intl-durationformat-constructor","titleHTML":"Properties of the Intl.DurationFormat Constructor","number":"1.3"},{"type":"term","term":"%DurationFormatPrototype%","refId":"sec-properties-of-intl-durationformat-prototype-object"},{"type":"clause","id":"sec-Intl.DurationFormat.prototype.constructor","titleHTML":"Intl.DurationFormat.prototype.constructor","number":"1.4.1"},{"type":"clause","id":"sec-Intl.DurationFormat.prototype-@@tostringtag","titleHTML":"Intl.DurationFormat.prototype [ @@toStringTag ]","number":"1.4.2"},{"type":"clause","id":"sec-Intl.DurationFormat.prototype.format","title":"Intl.DurationFormat.prototype.format ( duration )","titleHTML":"Intl.DurationFormat.prototype.format ( duration )","number":"1.4.3"},{"type":"clause","id":"sec-Intl.DurationFormat.prototype.formatToParts","title":"Intl.DurationFormat.prototype.formatToParts ( duration )","titleHTML":"Intl.DurationFormat.prototype.formatToParts ( duration )","number":"1.4.4"},{"type":"table","id":"table-durationformat-resolvedoptions-properties","number":4,"caption":"Table 4: Resolved Options of DurationFormat Instances","referencingIds":["_ref_4"]},{"type":"clause","id":"sec-Intl.DurationFormat.prototype.resolvedOptions","titleHTML":"Intl.DurationFormat.prototype.resolvedOptions ( )","number":"1.4.5"},{"type":"clause","id":"sec-properties-of-intl-durationformat-prototype-object","titleHTML":"Properties of the Intl.DurationFormat Prototype Object","number":"1.4","referencingIds":["_ref_47","_ref_54"]},{"type":"clause","id":"sec-properties-of-intl-durationformat-instances","titleHTML":"Properties of Intl.DurationFormat Instances","number":"1.5"},{"type":"clause","id":"durationformat-objects","titleHTML":"DurationFormat Objects","number":"1"},{"type":"clause","id":"sec-copyright-and-software-license","title":"Copyright & Software License","titleHTML":"Copyright & Software License","number":"A"}]}`); ;let usesMultipage = false