Page MenuHomePhabricator

Media options don't have the whitespace leniency as template arguments
Open, MediumPublic


One of the notes I added to Help:Images: "If there is a space character between alt and the equals sign, the alt statement will be treated as a caption." This behavior is contrary to how editors are used to working with template parameters. Yes, I know that images are not templates, but it is difficult to manage this inconsistent behavior, and there does not appear to be a good design reason for treating these spaces as syntactically meaningful while (for example) stripping out spaces after the equals sign.

You can see this alt= versus alt = behavior here:

This comes from pattern matching,

                "name": "img_alt",
                "aliases": [
                "case-sensitive": ""