Handle conflicting image format options in predictable way.
authorC. Scott Ananian <cscott@cscott.net>
Tue, 18 Mar 2014 16:59:21 +0000 (12:59 -0400)
committerC. Scott Ananian <cscott@cscott.net>
Tue, 18 Mar 2014 18:21:33 +0000 (14:21 -0400)
commit083ec382c4afb0b43468130bdaf1e31dcb8918cd
tree127c0ddbf9cfdbdb0275dcfae10f1f75a823abf1
parenteca4351d1f0a168f00be861d92ed2b2375aad4f5
Handle conflicting image format options in predictable way.

The PHP parser now uses the first image format option that appears,
and ignores subsequent format options.  This enforces the "zero or one"
language in
https://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax#Type
and makes parser behavior more predictable.  This also matches Parsoid
behavior.

Change-Id: Ifa32238b3d274123c7b98022cf688c33edfd7197
includes/parser/Parser.php
tests/parser/parserTests.txt