mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 08:34:54 +00:00
Merge "Don't set rel="mw:thumb" on the <a> inside a block image"
This commit is contained in:
commit
12bd0ab325
|
@ -158,7 +158,6 @@ ve.dm.MWBlockImageNode.static.toDomElements = function ( data, doc, converter )
|
|||
} else if ( classes.length > 0 ) {
|
||||
figure.className = classes.join( ' ' );
|
||||
}
|
||||
a.setAttribute( 'rel', 'mw:thumb' );
|
||||
a.setAttribute( 'href', dataElement.attributes.href );
|
||||
img.setAttribute( 'src', dataElement.attributes.src );
|
||||
img.setAttribute( 'width', dataElement.attributes.width );
|
||||
|
|
|
@ -3367,7 +3367,7 @@ ve.dm.example.domToDataCases = {
|
|||
]
|
||||
},
|
||||
'thumb image': {
|
||||
'html': '<body><figure typeof="mw:Image/Thumb" class="mw-halign-right"><a rel="mw:thumb" href="Foo"><img src="Bar" width="1" height="2" resource="FooBar"></a><figcaption class="mw-figcaption">abc</figcaption></figure></body>',
|
||||
'html': '<body><figure typeof="mw:Image/Thumb" class="mw-halign-right"><a href="Foo"><img src="Bar" width="1" height="2" resource="FooBar"></a><figcaption class="mw-figcaption">abc</figcaption></figure></body>',
|
||||
'data': [
|
||||
{
|
||||
'type': 'mwBlockImage',
|
||||
|
@ -3393,7 +3393,7 @@ ve.dm.example.domToDataCases = {
|
|||
]
|
||||
},
|
||||
'attribute preservation does not crash due to text node split': {
|
||||
'html': '<body><figure typeof="mw:Image/Thumb" data-parsoid="{}"><a rel="mw:thumb" href="Foo" data-parsoid="{}"><img src="Bar" width="1" height="2" resource="FooBar" data-parsoid="{}"></a><figcaption class="mw-figcaption" data-parsoid="{}"> foo <a rel="mw:WikiLink" href="./Bar" data-parsoid="{}">bar</a> baz</figcaption></figure></body>',
|
||||
'html': '<body><figure typeof="mw:Image/Thumb" data-parsoid="{}"><a href="Foo" data-parsoid="{}"><img src="Bar" width="1" height="2" resource="FooBar" data-parsoid="{}"></a><figcaption class="mw-figcaption" data-parsoid="{}"> foo <a rel="mw:WikiLink" href="./Bar" data-parsoid="{}">bar</a> baz</figcaption></figure></body>',
|
||||
'data': [
|
||||
{
|
||||
'type': 'mwBlockImage',
|
||||
|
|
Loading…
Reference in a new issue