r92275 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92274‎ | r92275 | r92276 >
Date:18:52, 15 July 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Code cleanup.
Modified paths:
  • /trunk/parsers/wikidom/lib/es/es.Surface.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/es/es.Surface.js
@@ -518,13 +518,10 @@
519519 * @param selection {Selection} Range to apply annotation to
520520 */
521521 Surface.prototype.annotateContent= function( method, annotation, selection ) {
522 - var block;
523 - var i;
524 -
 522+ // Fall back to current selection if no selection argument was given
525523 if ( selection === undefined ) {
526524 selection = this.selection;
527525 }
528 - var surface = this;
529526 if ( selection.from && selection.to ) {
530527 selection.normalize();
531528 var from = selection.start,
@@ -534,7 +531,8 @@
535532 from.block.annotateContent( method, annotation, from.offset, to.offset );
536533 } else {
537534 // Multiple block annotation
538 - for ( i = from.block.getIndex(), end = to.block.getIndex(); i <= end; i++ ) {
 535+ var block;
 536+ for ( var i = from.block.getIndex(), end = to.block.getIndex(); i <= end; i++ ) {
539537 block = this.doc.blocks[i];
540538 if ( block === from.block ) {
541539 // From offset to length

Status & tagging log