Set proper TSR on cite expansion output end meta

Also remove the src, as we re-set it based on DSR anyway.

No change in parserTests, but three less diffs in L'Opéra national de Paris.

Change-Id: Ia6784efe7d76c41f24a183465393bda78641a8eb
This commit is contained in:
Gabriel Wicke 2012-10-31 16:43:28 -07:00
parent a884a28b09
commit 2a774f0720

View file

@ -76,8 +76,7 @@ Cite.prototype.handleRef = function ( tokens ) {
var start = startTsr[0],
end = endTsr ? endTsr[1] : text.length;
span.dataAttribs = {
tsr: [start, end],
src: endTsr ? text.substring(start, end) : text.substring(start)
tsr: [start, end]
};
}
@ -93,8 +92,9 @@ Cite.prototype.handleRef = function ( tokens ) {
new SelfclosingTagTk( 'meta',
[
new KV( 'typeof', 'mw:Object/Ext/Cite/End' ),
new KV( 'about', refId)
] )
new KV( 'about', refId),
]
, { tsr: ( endTsr || [null, text.length] ) } )
];
//console.warn( 'ref res: ' + JSON.stringify( res, null, 2 ) );
return { tokens: res };