Skip to content

Meaning of optional segment #44

@thomasp85

Description

@thomasp85

Hi

I'm currently building an R binding for path-tree and during testing I came to the realisation that my understanding of the :name? pattern is flawed, or the implementation broken.

What I observe:

comparing /test/:me and /test/:me?, only the latter matches to /test/ which is what I would expect.

comparing /test/:me/now and /test/:me?/now, none of them matches to /test/now and both matches to /test//now. I would assume the latter would match to /test/now, or the former wouldn't match to /test//now but they seem identical

is this a bug, or if not, what is the differentiator for the two patterns?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions