Skip to content

Read a .wimport path that contains spaces, and cut 1.5.2 - #128

Merged
marcosqlbi merged 1 commit into
mainfrom
fix/wimport-path-spaces
Sep 16, 2026
Merged

marcosqlbi merged 1 commit into
mainfrom
fix/wimport-path-spaces

Conversation

@marcosqlbi

Copy link
Copy Markdown
Collaborator

Why

A .wimport that names a file with a space in it — ![short alt](./test - Copy.svg) — did not import the picture. Both the image and the link pattern ended a destination at the first whitespace, so the section matched neither and fell through to the last resort in Recognize: a plain text container showing the raw Markdown. The file was never opened, so it did not even appear in the missing-files dialog.

Strict CommonMark does require <...> around a destination with spaces, and that form already worked. But a recipe names files on a Windows disk, where a space in a name is ordinary, so the parser should accept what the author typed.

What changed

Both patterns now share one Destination fragment: the path runs to the closing parenthesis, an optional "title" is recognized so it cannot be swallowed into the path, and newlines are excluded so an unclosed parenthesis cannot match across lines. A name containing ) still needs angle brackets, and docs/wimport.md now says so.

![alt](./a.svg "Title") works as a side effect; it previously fell through to plain text as well.

This also bumps the version to 1.5.2. Its notes carry two entries, because the Prompt text type merged in #127 without a version bump of its own.

Validation

  • dotnet build Whiteboard.sln -c Release — 0 warnings, 0 errors
  • Both smoke suites pass, with new coverage for a spaced name, the angle-bracket form, and a link title
  • The reported sample, Test with space.wimport, now resolves test - Copy.svg (6126 bytes) as an image container, with no missing files

🤖 Generated with Claude Code

A destination stopped at the first whitespace, so an image or link naming
a file with a space in it never matched and the section fell through to a
plain text container showing the raw Markdown. The path now runs to the
closing parenthesis, with an optional link title recognized so it cannot
be swallowed into the path, and newlines excluded so an unclosed
parenthesis cannot match across lines.

Bumps the version to 1.5.2, whose notes also cover the Prompt text type
that merged in #127 without a version bump of its own.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@marcosqlbi
marcosqlbi merged commit 6a490e0 into main Sep 16, 2026
5 checks passed
@marcosqlbi
marcosqlbi deleted the fix/wimport-path-spaces branch September 16, 2026 16:44
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.

1 participant