Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/103068
Change subject: WIP: Edited image attributes should override data-parsoid value. ...................................................................... WIP: Edited image attributes should override data-parsoid value. Bug: 48665 Bug: 49221 Change-Id: If5bef14e27d2d2ee944040dbca3b4c6cdef67c7e --- M js/tests/parserTests.txt 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/68/103068/1 diff --git a/js/tests/parserTests.txt b/js/tests/parserTests.txt index 1895442..65853e0 100644 --- a/js/tests/parserTests.txt +++ b/js/tests/parserTests.txt @@ -18759,6 +18759,27 @@ <p data-parsoid='{"dsr":[0,24,0,0]}'><span typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100px"}],"cacheKey":"[[Image:Wiki.png|100px]]","img":{"h":115,"w":100,"wdset":true},"dsr":[0,24,null,null]}'><a href="./File:Wiki.png" data-parsoid='{"a":{"href":"./File:Wiki.png"}}'><img resource="./File:Wiki.png" src="//upload.wikimedia.org/wikipedia/en/thumb/b/bc/Wiki.png/100px-Wiki.png" height="230" width="200" data-parsoid='{"a":{"resource":"./File:Wiki.png"},"sa":{"resource":"Image:Wiki.png"}}'></a></span></p> !!end +# note that the data-parsoid value conflicts with the figure's class +!! test +Image: Modifying alignment of an image (bug 48665) +!! options +parsoid=html2wt +!! input +[[Image:Wiki.png|thumb|right|caption]] +!! result +<figure class="mw-default-size mw-halign-right" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"left","ak":"left"},{"ck":"caption","ak":"caption"}],"cacheKey":"[[Image:Wiki.png|thumb|left|caption]]","img":{"h":155,"w":135},"dsr":[0,37,2,2]}'><a href="./File:Wiki.png" data-parsoid='{"a":{"href":"./File:Wiki.png"},"dsr":[2,null,null,null]}'><img resource="./File:Wiki.png" src="//upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png" height="155" width="135" data-parsoid='{"a":{"resource":"./File:Wiki.png"},"sa":{"resource":"Image:Wiki.png"}}'/></a><figcaption data-parsoid='{"dsr":[null,35,null,null]}'>caption</figcaption></figure> +!! end + +!! test +Image: Modifying valign of an image (bug 49221) +!! options +parsoid=html2wt +!! input +[[File:Example.jpg|20px|top]] +!! result +<p data-parsoid='{"dsr":[0,29,0,0]}'><span class="mw-valign-top" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"20px"},{"ck":"top","ak":"top"}],"cacheKey":"[[File:Example.jpg|20px|top]]","img":{"h":22,"w":20,"wdset":true},"dsr":[0,29,null,null]}'><a href="./File:Example.jpg" data-parsoid='{"a":{"href":"./File:Example.jpg"}}'><img resource="./File:Example.jpg" src="//upload.wikimedia.org/wikipedia/en/thumb/a/a9/Example.jpg/20px-Example.jpg" height="22" width="20" data-parsoid='{"a":{"resource":"./File:Example.jpg"},"sa":{"resource":"File:Example.jpg"}}'/></a></span></p> +!! end + !! test Image: New block level image should have \n before and after !! options -- To view, visit https://gerrit.wikimedia.org/r/103068 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If5bef14e27d2d2ee944040dbca3b4c6cdef67c7e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Cscott <canan...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits