“MediaWiki:Gadget-site-lib.codemirror.js”的版本间差异

无编辑摘要
return $line[0];
});
$target.empty().addClass( 'wiki' ).append( content );
if ($target.hasClass( 'linenums' )) { // 添加行号
const start = $target.data( 'start' ) || 1;
$target.replaceWith( $('<ol>', { start: start,
html: content.map(function(ele, i) { return $('<li>', {html: ele, id: 'L' + (i + start)}); })
}).css('padding-left', (content.length + start - 1).toString().length + 2.5 + 'ch') );
} else { $target.replaceWith( content ); }
},
callback = function(entries) { entries.filter(function(obj) { return obj.isIntersecting; }).forEach( render ); },
16,874

个编辑