Skip to content

Path/branch extraction removes every /blob/ and /tree/ marker, not just the leading one #150

@protoroto

Description

@protoroto

Description

Creating this issue to make this #149 mergeable.

path and branch are extracted from the matched URL by removing the leading
/blob/, /tree/, /-/blob/ or /-/tree/ marker. The code did this with
str.replace(marker, ""), which removes every occurrence of the marker, not
just the leading one. When the file path or branch name legitimately contains the
same segment again, the result is silently corrupted.

Metadata

Metadata

Assignees

No one assigned

    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