Prettier 3.9.4 (regression introduced in 3.9.0; last good version 3.8.5)
Playground link
# Options (if any):
--parser markdown
Input:
- [[slug|Label: with colon]]
- [[slug|A: B: C]]
- [[slug|Label with no colon]]
- [text|Label: with colon]
Output:
- [[slug|Label]]
- [[slug|A]]
- [[slug|Label with no colon]]
- [text|Label: with colon]
Expected output:
- [[slug|Label: with colon]]
- [[slug|A: B: C]]
- [[slug|Label with no colon]]
- [text|Label: with colon]
Why?
Text content after the first : inside a [[...|...]] is silently deleted — this is content loss, not reformatting, and Prettier should never change a document's content. This regressed in 3.9.0 (3.8.5 leaves the input untouched).
The trigger is specific to the double-bracket form: CommonMark parses [[a]] as a shortcut reference link nested inside another link, and the colon in the label triggers the drop. A single-bracket [text|Label: with colon] and a colon-free [[slug|Label]] are both left intact — so it's the [[...]] + : combination. This [[target|Alias: description]] shape is standard Obsidian/wiki-link syntax, so prettier --write silently strips the descriptive half of every such cross-reference in a docs vault.
Prettier 3.9.4 (regression introduced in 3.9.0; last good version 3.8.5)
Playground link
# Options (if any): --parser markdownInput:
Output:
Expected output:
Why?
Text content after the first
:inside a[[...|...]]is silently deleted — this is content loss, not reformatting, and Prettier should never change a document's content. This regressed in 3.9.0 (3.8.5 leaves the input untouched).The trigger is specific to the double-bracket form: CommonMark parses
[[a]]as a shortcut reference link nested inside another link, and the colon in the label triggers the drop. A single-bracket[text|Label: with colon]and a colon-free[[slug|Label]]are both left intact — so it's the[[...]]+:combination. This[[target|Alias: description]]shape is standard Obsidian/wiki-link syntax, soprettier --writesilently strips the descriptive half of every such cross-reference in a docs vault.