FeatureFuel
1

Two string-utility edge-case fixes: normalizePath leading-backslash & formatTitle empty-segment spacing (PRs ready, pending Discussion)

Source: directus/directus#28205 · opened by @yfwmaniish
Summary I opened two small, self-contained bug fixes in Directus's string utilities. They were closed with a note that a PR needs a prior accepted Discussion, so I'm opening this to get a maintainer greenlight before resubmitting. Both are minimal, fully tested, and ship a changeset. Happy to split this into two separate threads/issues if that's preferred. • #28198 — normalizePath (@directus/utils) • #28199 — formatTitle (@directus/format-title) --- 1. normalizePath strips a leading forward slash but not a leading backslash (removeLeading) normalizePath normalizes Windows backslashes to forward slashes, but with removeLeading: true it only strips a leading forward slash. A backslash-leading path — which the function itself has just normalized to a forward-slash path — keeps its leading slash. The check tested the *raw input* for a leading / instead of the leading separator of the normalized result. | Input (removeLeading: true) | Before | After | |---|…

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests