| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
ve.dm.MWAlienAnnotationNode = function VeDmMWAlienAnnotationNode() { |
| 20 |
|
| 21 |
ve.dm.MWAlienAnnotationNode.super.apply( this, arguments ); |
| 22 |
}; |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
OO.inheritClass( ve.dm.MWAlienAnnotationNode, ve.dm.MWAnnotationNode ); |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
ve.dm.MWAlienAnnotationNode.static.name = 'mwAlienAnnotation'; |
| 31 |
|
| 32 |
ve.dm.MWAlienAnnotationNode.static.matchRdfaTypes = [ |
| 33 |
/^mw:Annotation\// |
| 34 |
]; |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
ve.dm.MWAlienAnnotationNode.static.toDataElement = function ( domElements ) { |
| 39 |
|
| 40 |
const element = ve.dm.MWAlienAnnotationNode.super.static.toDataElement.call( this, domElements ); |
| 41 |
|
| 42 |
element.type = 'mwAlienAnnotation'; |
| 43 |
return element; |
| 44 |
}; |
| 45 |
|
| 46 |
ve.dm.MWAlienAnnotationNode.prototype.getWikitextTag = function () { |
| 47 |
const type = this.getAttribute( 'type' ); |
| 48 |
if ( type.indexOf( '/End', type.length - 4 ) !== -1 ) { |
| 49 |
return '</UNKNOWN>'; |
| 50 |
} |
| 51 |
return '<UNKNOWN>'; |
| 52 |
}; |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
ve.dm.modelRegistry.register( ve.dm.MWAlienAnnotationNode ); |