Skip to content

Replace with multiple capture groups fails to recognise how to restore HTML #72

@ardcore

Description

@ardcore

Example: https://jsfiddle.net/zzby5zb6/1/

Actually, this isn't technically incorrect, as the replace function has no way of knowing if the intention was to put the !!! inside of the span element or outside of it.
As far as I understand, this is limited by the current design. I understand your desire to stay true to the original regexp/replace syntax, but to avoid such scenarios, maybe it would make sense to consider using capture group delimiters? Being able to express something like {$1!!!}{$2} would solve the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions