Author: bugs
Description:
This doesn't work:
<gallery>
Image:foo.jpg <-- image taken from www.source.com -->
</gallery>
Seems useful and should work.
Version: 1.20.x
Severity: minor
Author: bugs
Description:
This doesn't work:
<gallery>
Image:foo.jpg <-- image taken from www.source.com -->
</gallery>
Seems useful and should work.
Version: 1.20.x
Severity: minor
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| parser: Strip off HTML comments from/beside image name | mediawiki/core | master | +4 -0 |
Try:
<gallery>
Image:foo.jpg| <!-- image taken from www.source.com -->
</gallery>
Notice the vertical bar/pipe (|) and the exclamation mark (!).
bugs wrote:
Interesting - that's sort of a workaround, in that you're specifying a blank caption. It still seems like some kind of bug/limitation (is there anywhere else that <!-- comments --> aren't allowed?) but not severe.
Change 532249 had a related patch set uploaded (by D3r1ck01; owner: Derick Alangi):
[mediawiki/core@master] parser: Strip off HTML comments from/beside image name
Change 532249 abandoned by D3r1ck01:
parser: Strip off HTML comments from/beside image name
Reason:
Per discussion with Krinkle
Editors need comments to work not only for explicit comments, but also to "comment out" snips of markup. This does work, but a comment opened with <!-- automatically ends at the next newline, instead of ending at the next -->. Also, it seems that the linter treats comments as markup and flags lint errors within comments. It seems to me the solution is very simple. First you remove comments according to the rules of HTML. Then you proceed with linter and gallery operations.
FYI, MediaWiki-extensions-CodeMirror (the "Improved Syntax Highlighting" beta featute) is helpful when trying to conform to the current gallery parser. It highlights HTML comments as part of the image name when the syntax is not supported.