Skip to content

markup_regex: recognize only valid roman numerals

Jake Dane requested to merge jakedane/apostrophe:jakedane-ordered-list into main

For ordered lists the prefix recognized any [a-z]+ string. That caused an issue if a line started with a [a-z]+ string followed by a dot, if that string was not a single letter or a valid roman numeral. That would dedent the line in the editor pane as if the string was a prefix.

This changes the regular expression to recognize as prefix only:

  • one or more digits
  • or a single lower case letter
  • or a valid roman numeral in lower case letters

Fixes #418 (closed).

Merge request reports