Skip to content

UTF8 RegexFix doesn't correct capture's text #170

Open
@chekoopa

Description

@chekoopa

convertMatchText @ Text.RE.ZeInternals.Types.Match does perfectly correct captures' offsets and lengths, but capturedText is left intact (at this very line you can see, it's put straight from input), which may provoke more issues with using the library, mostly Text.RE.PCRE.Text.

The workaround is take (captureLength c) $ drop (captureOffset c) $ (captureSource c), but it's kind of lame. Incorporating similar code into RegexFix would make it more transparent but may impact on performance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions