Award explanations convert a digit suffix on a symbol to a Unicode subscript, but the conversion matches only one digit. Symbols with multi-digit suffixes therefore render partly as normal text.
Steps to reproduce:
- Use a valid Factbase symbol with a multi-digit suffix, such as
foo10, in an award expression.
- Generate the award bill or bylaw containing that expression.
Actual result: Fbe::Award::PTerm#to_p applies /([a-z]+)([0-9])/, so foo10 is rendered as foo₁0 and rate23 as rate₂3. The displayed variable no longer follows the subscript convention used for digit suffixes and can be confused with a different symbol.
Expected result: convert every digit in a numeric suffix, for example rendering foo10 as foo₁₀ and rate23 as rate₂₃.
Technical evidence: lib/fbe/award.rb converts symbols through PTerm#to_p when generating human-readable award text, but the regular expression captures a single digit. Factbase's symbol grammar allows a sequence of digits after the initial letter, so these are valid inputs, not malformed expressions.
Award explanations convert a digit suffix on a symbol to a Unicode subscript, but the conversion matches only one digit. Symbols with multi-digit suffixes therefore render partly as normal text.
Steps to reproduce:
foo10, in an award expression.Actual result:
Fbe::Award::PTerm#to_papplies/([a-z]+)([0-9])/, sofoo10is rendered asfoo₁0andrate23asrate₂3. The displayed variable no longer follows the subscript convention used for digit suffixes and can be confused with a different symbol.Expected result: convert every digit in a numeric suffix, for example rendering
foo10asfoo₁₀andrate23asrate₂₃.Technical evidence:
lib/fbe/award.rbconverts symbols throughPTerm#to_pwhen generating human-readable award text, but the regular expression captures a single digit. Factbase's symbol grammar allows a sequence of digits after the initial letter, so these are valid inputs, not malformed expressions.