ProfessionalWiki / ProfessionalWiki/NativeMarkdown

Wikitext image keywords other than thumb are unsupported and leak into the caption

Open
#45 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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 caption
  • frameless — downscaled, no frame
  • border — 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 through FileEmbed::fromTitleAndParams() and core's Linker::makeImageLink(), not reproduced in a browser.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.