Skip to content

feat(micro-utilities): add remove-trailing-separator to replacements - #1233

Merged
43081j merged 2 commits into
e18e:mainfrom
kelvindesman:feat/micro-utilities-remove-trailing-separator
Nov 11, 2026
Merged

43081j merged 2 commits into
e18e:mainfrom
kelvindesman:feat/micro-utilities-remove-trailing-separator

Conversation

@kelvindesman

Copy link
Copy Markdown
Contributor

resolves #1179

Maps remove-trailing-separator to a regex replace. One difference: the package leaves strings of 2 characters or fewer alone, so a/ stays a/ there but becomes a with the snippet.

Used Claude Code to help; I checked it myself.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread manifests/micro-utilities.json Outdated
"snippet::remove-trailing-separator": {
"id": "snippet::remove-trailing-separator",
"type": "simple",
"description": "You can use `String.prototype.replace` to remove trailing separators while keeping the first character, so `/` stays `/`. On Windows, use `[/\\\\]+` to also remove backslashes.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while keeping the first character, so / stays /.

this seems like unnecessary information. why would it not keep the first character? it is "remove-trailing-separator"

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@43081j
43081j merged commit 3f2bddd into e18e:main Nov 11, 2026
5 checks passed
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.

[Replacement]: remove-trailing-separator

2 participants