ProfessionalWiki / ProfessionalWiki/NativeMarkdown
Wikitext image keywords other than thumb are unsupported and leak into the caption
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 12
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
[[File:X|...]] embeds support a minimal wikitext parameter subset: a width, alt=, a caption, and thumb. The
remaining framing and layout keywords are unimplemented:
frame— original size in a frame with a captionframeless— downscaled, no frameborder— a border around the image- alignment:
left,right,center,none
Deferred from #2 and tracked in #15, which is now closed: its named follow-ups shipped in 1.2.0, and its remaining
sub-item turned out to already match wikitext. Filing this so the gap stays visible.
There is a visible symptom beyond the missing feature. FileEmbed::fromTitleAndParams() treats the last
unrecognised parameter as the caption, so an alignment keyword becomes caption text rather than being ignored:
[[File:Cat.png|thumb|left]]renders a thumbnail captioned left, where wikitext renders a left-aligned
thumbnail with no caption.[[File:Cat.png|thumb|right|Real caption]]happens to render correctly, because the real caption overwrites
right. Parameter order hides the problem.
Low priority: nothing breaks, and it only bites when a keyword is the final parameter. Worth doing because file
embeds deliberately use wikitext syntax, so readers coming from wikitext will reasonably expect these keywords to
work — and where they are not implemented, they should at least be recognised and dropped rather than displayed.
AI-authored — Claude Code,
Opus 4.8 (max); filed while @JeroenDeDauw asked whether #15's remaining sub-item was worth doing ahead of the 1.2.0 release; not yet human-reviewed; behaviour traced throughFileEmbed::fromTitleAndParams()and core'sLinker::makeImageLink(), not reproduced in a browser.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in FileEmbed::fromTitleAndParams() and trace how parameters reach core's Linker::makeImageLink(). Ensure the listed framing and alignment keywords are recognized instead of becoming caption text, while preserving captions and existing width, alt, and thumb behavior; done means the final-keyword examples no longer leak keywords into captions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- content
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100