19 lines
1.6 KiB
Plaintext
19 lines
1.6 KiB
Plaintext
Just a small bug report on Goldbrain, not critical but could surface elsewhere: Bug: PATCH Target header fails when heading contains an em dash (—)
|
|
Endpoint: PATCH /vault/projects/active/earthdnd-personal.md
|
|
Reproduction:
|
|
The file contains a top-level heading:
|
|
|
|
# EarthDnD — Personal Project
|
|
|
|
A subheading target using the full :: path fails:
|
|
|
|
Target: EarthDnD — Personal Project::AI Platform Roles
|
|
|
|
Error returned:
|
|
|
|
{ "message": "The patch you provided could not be applied to the target content.\ninvalid-target", "errorCode": 40080 }
|
|
|
|
What works: PATCH succeeds on headings with no special characters (e.g., Target: AI Platform Roles on a file where that H2 exists at the top level, or Target: EarthDnD::AI Platform Roles if the H1 used a regular hyphen).
|
|
Workaround currently in use: GET the full file → edit content in memory → PUT the entire file back. This is reliable but overwrites atomically rather than patching in place, which creates a race condition risk on frequently-written files.
|
|
Suspected cause: The em dash (—, U+2014) in the heading path is either not being URL/header decoded correctly before the heading lookup, or the heading-matching regex doesn't treat it as a valid character. Parentheses in heading names have caused the same error in testing, suggesting the parser may be applying regex-special-character rules to the target string without escaping.
|
|
Request: Support em dash and parentheses in Target heading paths, or document a percent-encoding workaround (e.g., EarthDnD%20%E2%80%94%20Personal%20Project::AI%20Platform%20Roles) if that's the intended escape mechanism. |