http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96019
Revision: 96019
Author: tparscal
Date: 2011-09-01 18:08:09 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
Fixed lots of syntax errors, accidental globals, and incorrect pathnames
Modified Paths:
--------------
trunk/parsers/wikidom/demos/es/es.js
trunk/parsers/wikidom/demos/renderers/index.html
trunk/parsers/wikidom/demos/surface/jquery.editSurface.js
trunk/parsers/wikidom/demos/surface/jquery.flow.js
trunk/parsers/wikidom/lib/es/es.Content.js
trunk/parsers/wikidom/lib/es/es.ContentFlow.js
trunk/parsers/wikidom/lib/es/es.Surface.js
trunk/parsers/wikidom/lib/synth/bases/es.ContentSeries.js
trunk/parsers/wikidom/lib/synth/models/es.ContentModel.js
trunk/parsers/wikidom/lib/synth/models/es.DocumentModel.js
trunk/parsers/wikidom/lib/synth/models/es.TableBlockModel.js
trunk/parsers/wikidom/lib/synth/models/es.TableBlockRowModel.js
trunk/parsers/wikidom/lib/synth/views/es.ContentView.js
trunk/parsers/wikidom/tests/serializers/test.js
trunk/parsers/wikidom/tests/synth/index.html
Added Paths:
-----------
trunk/parsers/wikidom/demos/renderers/document.json
Removed Paths:
-------------
trunk/parsers/wikidom/demos/renderers/document.js
Modified: trunk/parsers/wikidom/demos/es/es.js
===================================================================
--- trunk/parsers/wikidom/demos/es/es.js 2011-09-01 18:00:11 UTC (rev
96018)
+++ trunk/parsers/wikidom/demos/es/es.js 2011-09-01 18:08:09 UTC (rev
96019)
@@ -1,6 +1,6 @@
$(document).ready( function() {
var showData = false;
- doc = es.Document.newFromWikiDomDocument( { 'blocks': [
+ var doc = es.Document.newFromWikiDomDocument( { 'blocks': [
{
"type": "paragraph",
"lines": [
Deleted: trunk/parsers/wikidom/demos/renderers/document.js
===================================================================
--- trunk/parsers/wikidom/demos/renderers/document.js 2011-09-01 18:00:11 UTC
(rev 96018)
+++ trunk/parsers/wikidom/demos/renderers/document.js 2011-09-01 18:08:09 UTC
(rev 96019)
@@ -1,227 +0,0 @@
-{
- "blocks": [
- {
- "type": "heading",
- "level": 2,
- "line": {
- "text": "This is a heading",
- "annotations": [
- {
- "type": "italic",
- "range": {
- "start": 10,
- "end": 17
- }
- }
- ]
- }
- },
- {
- "type": "rule"
- },
- {
- "type": "comment",
- "text": "Hello wild world of wikitext!"
- },
- {
- "type": "table",
- "attributes": {
- "class": "wikitable",
- "width": "50%"
- },
- "rows": [
- [
- {
- "type": "heading",
- "document": {
- "blocks": [
- {
- "type":
"paragraph",
-
"lines": [
-
{
-
"text": "This is a table heading"
-
}
- ]
- }
- ]
- }
- }
- ],
- [
- {
- "type": "data",
- "document": {
- "blocks": [
- {
- "type":
"paragraph",
-
"lines": [
-
{
-
"text": "This is a table cell"
-
}
- ]
- },
- {
- "type":
"paragraph",
-
"lines": [
-
{
-
"text": "This is another paragraph in a table cell"
-
}
- ]
- }
- ]
- }
- }
- ]
- ]
- },
- {
- "type": "paragraph",
- "lines": [
- {
- "text": "This is a test paragraph!",
- "annotations": [
- {
- "type": "italic",
- "range": {
- "start": 0,
- "end": 4
- }
- },
- {
- "type": "xlink",
- "range": {
- "start": 8,
- "end": 22
- },
- "data": {
- "url":
"http://www.a.com"
- }
- },
- {
- "type": "bold",
- "range": {
- "start": 10,
- "end": 14
- }
- }
- ]
- },
- {
- "text": "Paragraphs can have more than
one line.",
- "annotations": [
- {
- "type": "italic",
- "range": {
- "start": 11,
- "end": 14
- }
- },
- {
- "type": "bold",
- "range": {
- "start": 20,
- "end": 24
- }
- }
- ]
- }
- ]
- },
- {
- "type": "paragraph",
- "lines": [
- {
- "text": "Documents can have one or more
blocks.",
- "annotations": [
- {
- "type": "bold",
- "range": {
- "start": 0,
- "end": 9
- }
- }
- ]
- }
- ]
- },
- {
- "type": "list",
- "style": "number",
- "items": [
- {
- "line": {
- "text": "First item"
- },
- "lists": [
- {
- "type": "list",
- "style": "bullet",
- "items": [
- {
- "line":
{
-
"text": "First sub-item"
- }
- },
- {
- "line":
{
-
"text": "Second sub-item"
- }
- },
- {
- "line":
{
-
"text": "Third sub-item"
- }
- }
- ]
- }
- ]
- },
- {
- "line": {
- "text": "Second item",
- "annotations": [
- {
- "type":
"italic",
- "range": {
-
"start": 0,
- "end": 6
- }
- }
- ]
- }
- },
- {
- "line": {
- "text": "Third item",
- "annotations": [
- {
- "type": "bold",
- "range": {
-
"start": 0,
- "end": 5
- }
- }
- ]
- }
- },
- {
- "line": {
- "text": "Fourth item",
- "annotations": [
- {
- "type": "ilink",
- "range": {
-
"start": 7,
- "end":
12
- },
- "data": {
-
"title": "User:JohnDoe"
- }
- }
- ]
- }
- }
- ]
- }
- ]
-}
\ No newline at end of file
Copied: trunk/parsers/wikidom/demos/renderers/document.json (from rev 95828,
trunk/parsers/wikidom/demos/renderers/document.js)
===================================================================
--- trunk/parsers/wikidom/demos/renderers/document.json
(rev 0)
+++ trunk/parsers/wikidom/demos/renderers/document.json 2011-09-01 18:08:09 UTC
(rev 96019)
@@ -0,0 +1,227 @@
+{
+ "blocks": [
+ {
+ "type": "heading",
+ "level": 2,
+ "line": {
+ "text": "This is a heading",
+ "annotations": [
+ {
+ "type": "italic",
+ "range": {
+ "start": 10,
+ "end": 17
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "rule"
+ },
+ {
+ "type": "comment",
+ "text": "Hello wild world of wikitext!"
+ },
+ {
+ "type": "table",
+ "attributes": {
+ "class": "wikitable",
+ "width": "50%"
+ },
+ "rows": [
+ [
+ {
+ "type": "heading",
+ "document": {
+ "blocks": [
+ {
+ "type":
"paragraph",
+
"lines": [
+
{
+
"text": "This is a table heading"
+
}
+ ]
+ }
+ ]
+ }
+ }
+ ],
+ [
+ {
+ "type": "data",
+ "document": {
+ "blocks": [
+ {
+ "type":
"paragraph",
+
"lines": [
+
{
+
"text": "This is a table cell"
+
}
+ ]
+ },
+ {
+ "type":
"paragraph",
+
"lines": [
+
{
+
"text": "This is another paragraph in a table cell"
+
}
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ ]
+ },
+ {
+ "type": "paragraph",
+ "lines": [
+ {
+ "text": "This is a test paragraph!",
+ "annotations": [
+ {
+ "type": "italic",
+ "range": {
+ "start": 0,
+ "end": 4
+ }
+ },
+ {
+ "type": "xlink",
+ "range": {
+ "start": 8,
+ "end": 22
+ },
+ "data": {
+ "url":
"http://www.a.com"
+ }
+ },
+ {
+ "type": "bold",
+ "range": {
+ "start": 10,
+ "end": 14
+ }
+ }
+ ]
+ },
+ {
+ "text": "Paragraphs can have more than
one line.",
+ "annotations": [
+ {
+ "type": "italic",
+ "range": {
+ "start": 11,
+ "end": 14
+ }
+ },
+ {
+ "type": "bold",
+ "range": {
+ "start": 20,
+ "end": 24
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "lines": [
+ {
+ "text": "Documents can have one or more
blocks.",
+ "annotations": [
+ {
+ "type": "bold",
+ "range": {
+ "start": 0,
+ "end": 9
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "list",
+ "style": "number",
+ "items": [
+ {
+ "line": {
+ "text": "First item"
+ },
+ "lists": [
+ {
+ "type": "list",
+ "style": "bullet",
+ "items": [
+ {
+ "line":
{
+
"text": "First sub-item"
+ }
+ },
+ {
+ "line":
{
+
"text": "Second sub-item"
+ }
+ },
+ {
+ "line":
{
+
"text": "Third sub-item"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "line": {
+ "text": "Second item",
+ "annotations": [
+ {
+ "type":
"italic",
+ "range": {
+
"start": 0,
+ "end": 6
+ }
+ }
+ ]
+ }
+ },
+ {
+ "line": {
+ "text": "Third item",
+ "annotations": [
+ {
+ "type": "bold",
+ "range": {
+
"start": 0,
+ "end": 5
+ }
+ }
+ ]
+ }
+ },
+ {
+ "line": {
+ "text": "Fourth item",
+ "annotations": [
+ {
+ "type": "ilink",
+ "range": {
+
"start": 7,
+ "end":
12
+ },
+ "data": {
+
"title": "User:JohnDoe"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
Property changes on: trunk/parsers/wikidom/demos/renderers/document.json
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Modified: trunk/parsers/wikidom/demos/renderers/index.html
===================================================================
--- trunk/parsers/wikidom/demos/renderers/index.html 2011-09-01 18:00:11 UTC
(rev 96018)
+++ trunk/parsers/wikidom/demos/renderers/index.html 2011-09-01 18:08:09 UTC
(rev 96019)
@@ -47,7 +47,7 @@
</head>
<body>
<p>
- This page use <a href="document.js">a JSON representation of
wikitext</a> as input to two renderers: wikitext and HTML. The JSON source is
appended at the end of the document for reference.</p>
+ This page use <a href="document.json">a JSON representation of
wikitext</a> as input to two renderers: wikitext and HTML. The JSON source is
appended at the end of the document for reference.</p>
<h2>HTML Rendering</h2>
<div id="html-rendering" class="render"></div>
<h2>HTML Source</h2>
@@ -60,6 +60,7 @@
<script src="../../lib/es/es.js"></script>
<script src="../../lib/es/es.EventEmitter.js"></script>
<script src="../../lib/es/es.Container.js"></script>
+ <script src="../../lib/es/es.DomContainer.js"></script>
<script src="../../lib/es/es.AnnotationSerializer.js"></script>
<script src="../../lib/es/es.Document.js"></script>
<script src="../../lib/es/es.Document.Context.js"></script>
@@ -69,7 +70,7 @@
<script
src="../../lib/es/es.Document.JsonSerializer.js"></script>
<script>
$( document ).ready( function() {
- $.getJSON( 'document.js', function( data ) {
+ $.getJSON( 'document.json', function( data ) {
var context = new es.Document.Context(),
htmlSerializer = new
es.Document.HtmlSerializer( context ),
wikitextSerializer = new
es.Document.WikitextSerializer( context ),
Modified: trunk/parsers/wikidom/demos/surface/jquery.editSurface.js
===================================================================
--- trunk/parsers/wikidom/demos/surface/jquery.editSurface.js 2011-09-01
18:00:11 UTC (rev 96018)
+++ trunk/parsers/wikidom/demos/surface/jquery.editSurface.js 2011-09-01
18:08:09 UTC (rev 96019)
@@ -1,6 +1,6 @@
$.fn.editSurface = function( options ) {
var $this = $(this);
- sel = {
+ var sel = {
'active': false
};
Modified: trunk/parsers/wikidom/demos/surface/jquery.flow.js
===================================================================
--- trunk/parsers/wikidom/demos/surface/jquery.flow.js 2011-09-01 18:00:11 UTC
(rev 96018)
+++ trunk/parsers/wikidom/demos/surface/jquery.flow.js 2011-09-01 18:08:09 UTC
(rev 96019)
@@ -61,15 +61,15 @@
}
$.flow = {
- 'charCache': {},
+ 'characterCache': {},
'wordCache': {},
'measureWord': function( text, ruler ) {
if ( typeof $.flow.wordCache[text] === 'undefined' ) {
// Cache miss
var word = { 'text': text, 'html': '', 'metrics': [] };
for ( var i = 0; i < text.length; i++ ) {
- var char = text[i],
- charHtml = char
+ var character = text[i],
+ characterHtml = character
.replace( '&', '&' )
.replace( ' ', ' ' )
.replace( '<', '<' )
@@ -78,15 +78,15 @@
.replace( '"', '"' )
.replace( '\n', '<span
class="editSurface-whitespace">\\n</span>' )
.replace( '\t', '<span
class="editSurface-whitespace">\\t</span>' );
- word.html += charHtml;
- if ( typeof $.flow.charCache[char] ===
'undefined' ) {
+ word.html += characterHtml;
+ if ( typeof $.flow.characterCache[character]
=== 'undefined' ) {
// Cache miss
- ruler.innerHTML = charHtml;
- word.metrics.push(
$.flow.charCache[char] = ruler.clientWidth );
+ ruler.innerHTML = characterHtml;
+ word.metrics.push(
$.flow.characterCache[character] = ruler.clientWidth );
continue;
}
// Cache hit
- word.metrics.push( $.flow.charCache[char] );
+ word.metrics.push(
$.flow.characterCache[character] );
}
ruler.innerHTML = word.html;
word.width = ruler.clientWidth;
@@ -116,7 +116,7 @@
'getLines': function( words, width ) {
// Lineify
var lineCount = 0,
- charCount = 0,
+ characterCount = 0,
wordCount = 0,
lines = [],
line = {
@@ -130,7 +130,7 @@
for ( var i = 0; i < words.length; i++ ) {
if ( line.width + words[i].width > width ) {
lines.push( line );
- charCount = 0;
+ characterCount = 0;
wordCount = 0;
lineCount++;
line = {
@@ -144,8 +144,8 @@
}
words[i].index = wordCount;
wordCount++;
- words[i].offset = charCount;
- charCount += words[i].text.length;
+ words[i].offset = characterCount;
+ characterCount += words[i].text.length;
line.words.push( words[i] );
line.text += words[i].text;
line.html += words[i].html;
Modified: trunk/parsers/wikidom/lib/es/es.Content.js
===================================================================
--- trunk/parsers/wikidom/lib/es/es.Content.js 2011-09-01 18:00:11 UTC (rev
96018)
+++ trunk/parsers/wikidom/lib/es/es.Content.js 2011-09-01 18:08:09 UTC (rev
96019)
@@ -370,11 +370,11 @@
for ( var i = 0; i < this.data.length; i++ ) {
if ( this.data[i].length > 1 ) {
for ( var j = 1; j < this.data[i].length; j++ ) {
- var float =
es.Content.annotationRenderers[this.data[i][j].type].float;
- if ( float && typeof float === 'function' ) {
- float = float( this.data[i][j].data );
+ var isFloating =
es.Content.annotationRenderers[this.data[i][j].type].float;
+ if ( isFloating && typeof isFloating ===
'function' ) {
+ isFloating = isFloating(
this.data[i][j].data );
}
- if ( float ) {
+ if ( isFloating ) {
return true;
}
}
@@ -685,18 +685,18 @@
}
var start = offset,
end = offset,
- char;
+ character;
while ( start > 0 ) {
start--;
- char = ( typeof this.data[start] === 'string' ?
this.data[start] : this.data[start][0] );
- if ( char.match( /\B/ ) ) {
+ character = ( typeof this.data[start] === 'string' ?
this.data[start] : this.data[start][0] );
+ if ( character.match( /\B/ ) ) {
start++;
break;
}
}
while ( end < this.data.length ) {
- char = ( typeof this.data[end] === 'string' ? this.data[end] :
this.data[end][0] );
- if ( char.match( /\B/ ) ) {
+ character = ( typeof this.data[end] === 'string' ?
this.data[end] : this.data[end][0] );
+ if ( character.match( /\B/ ) ) {
break;
}
end++;
Modified: trunk/parsers/wikidom/lib/es/es.ContentFlow.js
===================================================================
--- trunk/parsers/wikidom/lib/es/es.ContentFlow.js 2011-09-01 18:00:11 UTC
(rev 96018)
+++ trunk/parsers/wikidom/lib/es/es.ContentFlow.js 2011-09-01 18:08:09 UTC
(rev 96019)
@@ -415,8 +415,8 @@
*/
es.ContentFlow.prototype.appendLine = function( range, wordOffset, fractional
) {
var rs = this.renderState,
- lineCount = rs.lines.length;
- $line = this.$.children( '[line-index=' + lineCount + ']' );
+ lineCount = rs.lines.length,
+ $line = this.$.children( '[line-index=' + lineCount + ']' );
if ( !$line.length ) {
$line = $( '<div class="editSurface-line" line-index="' +
lineCount + '"></div>' );
this.$.append( $line );
@@ -468,6 +468,7 @@
end = range.end,
charOffset = this.boundaries[offset],
middle,
+ charMiddle,
lineWidth,
cacheKey;
do {
Modified: trunk/parsers/wikidom/lib/es/es.Surface.js
===================================================================
--- trunk/parsers/wikidom/lib/es/es.Surface.js 2011-09-01 18:00:11 UTC (rev
96018)
+++ trunk/parsers/wikidom/lib/es/es.Surface.js 2011-09-01 18:08:09 UTC (rev
96019)
@@ -83,7 +83,7 @@
},
'keyup.editSurface' : function( e ) {
return surface.onKeyUp( e );
- },
+ }
});
},
'blur': function( e ) {
@@ -121,12 +121,12 @@
}
es.Surface.prototype.getLocationFromEvent = function( e ) {
- var $target = $( e.target );
+ var $target = $( e.target ),
$block = $target.is( '.editSurface-block' )
? $target : $target.closest( '.editSurface-block' );
// Not a block or child of a block? Find the nearest block...
if( !$block.length ) {
- $blocks = this.$.find( '> .editSurface-document
.editSurface-block' );
+ var $blocks = this.$.find( '> .editSurface-document
.editSurface-block' );
$block = $blocks.first();
$blocks.each( function() {
// Stop looking when mouse is above top
Modified: trunk/parsers/wikidom/lib/synth/bases/es.ContentSeries.js
===================================================================
--- trunk/parsers/wikidom/lib/synth/bases/es.ContentSeries.js 2011-09-01
18:00:11 UTC (rev 96018)
+++ trunk/parsers/wikidom/lib/synth/bases/es.ContentSeries.js 2011-09-01
18:08:09 UTC (rev 96019)
@@ -45,7 +45,7 @@
es.ContentSeries.prototype.size = function() {
var sum = 0;
- for ( var i = 0, length = this.length; i++ ) {
+ for ( var i = 0, length = this.length; i < length; i++ ) {
sum += this[i].getLength();
}
return sum;
Modified: trunk/parsers/wikidom/lib/synth/models/es.ContentModel.js
===================================================================
--- trunk/parsers/wikidom/lib/synth/models/es.ContentModel.js 2011-09-01
18:00:11 UTC (rev 96018)
+++ trunk/parsers/wikidom/lib/synth/models/es.ContentModel.js 2011-09-01
18:08:09 UTC (rev 96019)
@@ -213,11 +213,11 @@
for ( var i = 0; i < this.data.length; i++ ) {
if ( this.data[i].length > 1 ) {
for ( var j = 1; j < this.data[i].length; j++ ) {
- var float =
es.Content.annotationRenderers[this.data[i][j].type].float;
- if ( float && typeof float === 'function' ) {
- float = float( this.data[i][j].data );
+ var isFloating =
es.Content.annotationRenderers[this.data[i][j].type].float;
+ if ( isFloating && typeof isFloating ===
'function' ) {
+ isFloating = isFloating(
this.data[i][j].data );
}
- if ( float ) {
+ if ( isFloating ) {
return true;
}
}
@@ -239,18 +239,18 @@
}
var start = offset,
end = offset,
- char;
+ character;
while ( start > 0 ) {
start--;
- char = ( typeof this.data[start] === 'string' ?
this.data[start] : this.data[start][0] );
- if ( char.match( /\B/ ) ) {
+ character = ( typeof this.data[start] === 'string' ?
this.data[start] : this.data[start][0] );
+ if ( character.match( /\B/ ) ) {
start++;
break;
}
}
while ( end < this.data.length ) {
- char = ( typeof this.data[end] === 'string' ? this.data[end] :
this.data[end][0] );
- if ( char.match( /\B/ ) ) {
+ character = ( typeof this.data[end] === 'string' ?
this.data[end] : this.data[end][0] );
+ if ( character.match( /\B/ ) ) {
break;
}
end++;
Modified: trunk/parsers/wikidom/lib/synth/models/es.DocumentModel.js
===================================================================
--- trunk/parsers/wikidom/lib/synth/models/es.DocumentModel.js 2011-09-01
18:00:11 UTC (rev 96018)
+++ trunk/parsers/wikidom/lib/synth/models/es.DocumentModel.js 2011-09-01
18:08:09 UTC (rev 96019)
@@ -30,7 +30,7 @@
// Blocks - if given, convert all plain "block" objects to
es.WikiDom* objects
!$.isArray( obj.blocks ) ? [] : $.map( obj.blocks, function(
block ) {
return es.BlockModel.newFromPlainObject( block );
- },
+ } ),
// Attributes - if given, make a deep copy of attributes
!$.isPlainObject( obj.attributes ) ? {} : $.extend( true, {},
obj.attributes )
);
Modified: trunk/parsers/wikidom/lib/synth/models/es.TableBlockModel.js
===================================================================
--- trunk/parsers/wikidom/lib/synth/models/es.TableBlockModel.js
2011-09-01 18:00:11 UTC (rev 96018)
+++ trunk/parsers/wikidom/lib/synth/models/es.TableBlockModel.js
2011-09-01 18:08:09 UTC (rev 96019)
@@ -28,7 +28,7 @@
// Cells - if given, convert plain "item" objects to
es.ListModelItem objects
!$.isArray( obj.rows ) ? [] : $.map( obj.rows, function( row ) {
return !$.isPlainObject( row ) ? null :
es.TableBlockRowModel.newFromPlainObject( row )
- } )
+ } ),
// Attributes - if given, make a deep copy of attributes
!$.isPlainObject( obj.attributes ) ? {} : $.extend( true, {},
obj.attributes )
);
@@ -60,7 +60,7 @@
} );
}
if ( !$.isEmptyObject( this.attributes ) ) {
- obj.attributes = $.extend( true, {}. this.attributes );
+ obj.attributes = $.extend( true, {}, this.attributes );
}
return obj;
};
Modified: trunk/parsers/wikidom/lib/synth/models/es.TableBlockRowModel.js
===================================================================
--- trunk/parsers/wikidom/lib/synth/models/es.TableBlockRowModel.js
2011-09-01 18:00:11 UTC (rev 96018)
+++ trunk/parsers/wikidom/lib/synth/models/es.TableBlockRowModel.js
2011-09-01 18:08:09 UTC (rev 96019)
@@ -25,7 +25,7 @@
// Cells - if given, convert plain "item" objects to
es.ListModelItem objects
!$.isArray( obj.cells ) ? [] : $.map( obj.cells, function( cell
) {
return !$.isPlainObject( cell ) ? null :
es.DocumentModel.newFromPlainObject( cell )
- } )
+ } ),
// Attributes - if given, make a deep copy of attributes
!$.isPlainObject( obj.attributes ) ? {} : $.extend( true, {},
obj.attributes )
);
@@ -57,7 +57,7 @@
} );
}
if ( !$.isEmptyObject( this.attributes ) ) {
- obj.attributes = $.extend( true, {}. this.attributes );
+ obj.attributes = $.extend( true, {}, this.attributes );
}
return obj;
};
Modified: trunk/parsers/wikidom/lib/synth/views/es.ContentView.js
===================================================================
--- trunk/parsers/wikidom/lib/synth/views/es.ContentView.js 2011-09-01
18:00:11 UTC (rev 96018)
+++ trunk/parsers/wikidom/lib/synth/views/es.ContentView.js 2011-09-01
18:08:09 UTC (rev 96019)
@@ -547,8 +547,8 @@
*/
es.ContentView.prototype.appendLine = function( range, wordOffset, fractional
) {
var rs = this.renderState,
- lineCount = rs.lines.length;
- $line = this.$.children( '[line-index=' + lineCount + ']' );
+ lineCount = rs.lines.length,
+ $line = this.$.children( '[line-index=' + lineCount + ']' );
if ( !$line.length ) {
$line = $( '<div class="editSurface-line" line-index="' +
lineCount + '"></div>' );
this.$.append( $line );
@@ -600,6 +600,7 @@
end = range.end,
charOffset = this.boundaries[offset],
middle,
+ charMiddle,
lineWidth,
cacheKey;
do {
Modified: trunk/parsers/wikidom/tests/serializers/test.js
===================================================================
--- trunk/parsers/wikidom/tests/serializers/test.js 2011-09-01 18:00:11 UTC
(rev 96018)
+++ trunk/parsers/wikidom/tests/serializers/test.js 2011-09-01 18:08:09 UTC
(rev 96019)
@@ -54,7 +54,7 @@
{
'subject': 'horizontal rule',
'dom': { 'blocks': [ {
- 'type': 'horizontal-rule',
+ 'type': 'horizontal-rule'
} ] },
'html': '<hr />',
'wikitext': '----'
Modified: trunk/parsers/wikidom/tests/synth/index.html
===================================================================
--- trunk/parsers/wikidom/tests/synth/index.html 2011-09-01 18:00:11 UTC
(rev 96018)
+++ trunk/parsers/wikidom/tests/synth/index.html 2011-09-01 18:08:09 UTC
(rev 96019)
@@ -11,9 +11,9 @@
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<script src="../../lib/synth/es.js"></script>
- <script src="../../lib/synth/es.EventEmitter.js"></script>
- <script src="../../lib/synth/es.Container.js"></script>
- <script src="../../lib/synth/es.ContainerItem.js"></script>
+ <script src="../../lib/synth/bases/es.EventEmitter.js"></script>
+ <script src="../../lib/synth/bases/es.Container.js"></script>
+ <script
src="../../lib/synth/bases/es.ContainerItem.js"></script>
<script src="../../lib/jquery.js"></script>
<script src="../../lib/qunit.js"></script>
<script src="test.js"></script>
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
