Skip to content

ReprHighlighter tag regex merges adjacent tags due to greedy [\w\W]* #4035

@themavik

Description

@themavik

highlighter.py has a tag pattern with [\w\W]* for tag_contents. This is greedy and matches across closing/opening tags.

For input like content1content2, the regex matches a single tag where tag_contents is ">content1content2</b" instead of matching two separate tags. The tag highlighting ends up wrong.

Probably needs a non-greedy [\w\W]*? or a negated character class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions