Skip to content

fix trailing slash detection with query slash - #392

Closed
mthaiptw wants to merge 1 commit into
unjs:mainfrom
mthaiptw:codex/fix-with-trailing-slash-query-slash
Closed

mthaiptw wants to merge 1 commit into
unjs:mainfrom
mthaiptw:codex/fix-with-trailing-slash-query-slash

Conversation

@mthaiptw

@mthaiptw mthaiptw commented Oct 9, 2026 •

Copy link
Copy Markdown

Summary

  • only treat slashes in the pathname as trailing when respecting query and fragment
  • add regression coverage for query values ending with /

Tests

  • pnpm test

Summary by CodeRabbit

  • Bug Fixes
    • Corrected trailing-slash detection when query parameters or fragments are present. Slashes within query or fragment text no longer count as trailing slashes; a slash at the end of the path is still recognized.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 31971edd-0814-4d2e-a4ba-175037ff0b0b

📥 Commits

Reviewing files that changed from the base of the PR and between f06c800 and 14ec610.


📒 Files selected for processing (2)
  • src/utils.ts
  • test/trailing-slash.test.ts

 __________________________________________________________
< Solving problems you didn't know you were about to have. >
 ----------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mthaiptw mthaiptw closed this Oct 9, 2026
@mthaiptw
mthaiptw deleted the codex/fix-with-trailing-slash-query-slash branch October 9, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants