mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 23:05:31 +00:00
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:
parent
a884a28b09
commit
2a774f0720
|
@ -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 };
|
||||
|
|
Loading…
Reference in a new issue