blawx icon indicating copy to clipboard operation
blawx copied to clipboard

Legal Texts with lowercase titles cause a crash

Open Gauntlet173 opened this issue 3 years ago • 2 comments

Gauntlet173 avatar Jul 08 '22 21:07 Gauntlet173

This appears to be happening when the submitted rule doc form attempts to generate the Akomo Ntoso spec from the clean library, which enforces that the first letter is ascii uppercase.

I believe this is the offending line. The potential fix would be to simply change the string.ascii_uppercase to string.ascii_letters.

I can submit a PR, but perhaps this is the standard for AKN? If that's the case, then we may not want to change this functionality and instead enforce that the user capitalizes the rule_text in the UI.

There may be three options to address this:

  • Change the akn generation to allow for lowercase.
  • Enforce uppercase at the user input level, by showing an error if the user starts with a lowercase.
  • Allowing the user to enter lowercase, and silently performing the conversion to uppercase behind the scenes

reganmeloche avatar Jun 14 '24 16:06 reganmeloche

My preference would be the first, but the third seems like a good work-around short term.

Gauntlet173 avatar Sep 27 '24 19:09 Gauntlet173