Skip to content

5.2

Choose a tag to compare

@facelessuser facelessuser released this 02 Nov 23:09
· 89 commits to master since this release
96bd78a

5.2

  • NEW: Add static typing.
  • FIX: Re format replacement captures behave more like Regex in that you can technically index into the captures of
    a given group in Re, but in Re there is only ever one or zero captures. Documentation was never really explicit on
    what one should expect if indexing a group in Re occurred. The documentation seemed to vaguely insinuate that it would
    behave like a Regex capture list, just with one or zero values in the list. In reality, the value was a simple string
    or None. This caused a bug in some cases where you'd have None inserted for a group if a group was optional, but
    referenced in the replacement template. Now the implementation matches the description in the documentation with the
    documentation now being more explicit about behavior.
  • FIX: Match Re and Regex handling when doing a non-format replacement that references a group that is present in
    the search pattern but has no actual captures. Such a case should not fail, but simply return an empty string for the
    group.
  • FIX: Format replacements that that have groups with no captures will yield an empty string as the only capture as
    long as the user does not try to index into any captures as there are no actual captures. This behavior was a bug in
    Regex that we duplicated and should now be fixed in the latest Regex (mrabarnett/mrab-regex#439) as well as in
    Backrefs.