Skip to content

Inconsistent trailing slash behaviour with multiple optional parameters #2190

@panstromek

Description

@panstromek

Reproduction

https://jsfiddle.net/7sg5pry1/

Steps to reproduce the bug

Try route like this:

'/page/:first(a)?:second(b)?'

(clicking the button in the reporduction link)

Expected behavior

It matches:

/page

Text "should be visible" is visible in repro

Actual behavior

Doesn't match /page

Text "should be visible" is not visible in repro

Additional information

This is inconsistent with the behaviour with only a single optional parameter:

'/page/:first(a)?' matches /page

Documentation doesn't explicitly mention this case, but implies should that trailing slash is removed in both cases

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