r91333 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91332‎ | r91333 | r91334 >
Date:23:51, 1 July 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Fixed "where are the newlines coming from" problem. Answer: from the original wikitext source.
Modified paths:
  • /trunk/parsers/wikidom/demos/es/index.html (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.ParagraphBlock.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/es/es.ParagraphBlock.js
@@ -20,7 +20,7 @@
2121 for ( var i = 0; i < this.lines.length; i++ ) {
2222 text.push( this.lines[i].text );
2323 }
24 - this.flow.setText( text.join( '\n' ) );
 24+ this.flow.setText( text.join( '' ) );
2525 };
2626
2727 /**
Index: trunk/parsers/wikidom/demos/es/index.html
@@ -22,17 +22,17 @@
2323 $(document).ready( function() {
2424 var doc = new Document([
2525 new ParagraphBlock([
26 - { 'text': "In text display, line wrap is the feature of continuing on a new line when a line is full, such that each line fits in the viewable window, allowing text to be read from top to bottom without any horizontal scrolling." },
27 - { 'text': "Word wrap is the additional feature of most text editors, word processors, and web browsers, of breaking lines between and not within words, except when a single word is longer than a line." },
28 - { 'text': "It is usually done on the fly when viewing or printing a document, so no line break code is manually entered, or stored.[citation needed] If the user changes the margins, the editor will either automatically reposition the line breaks to ensure that all the text will \"flow\" within the margins and remain visible, or provide the typist some convenient way to reposition the line breaks." },
29 - { 'text': "A soft return is the break resulting from line wrap or word wrap, whereas a hard return is an intentional break, creating a new paragraph." },
 26+ { 'text': "In text display, line wrap is the feature of continuing on a new line when a line is full, such that each line fits in the viewable window, allowing text to be read from top to bottom without any horizontal scrolling.\n" },
 27+ { 'text': "Word wrap is the additional feature of most text editors, word processors, and web browsers, of breaking lines between and not within words, except when a single word is longer than a line.\n" },
 28+ { 'text': "It is usually done on the fly when viewing or printing a document, so no line break code is manually entered, or stored.[citation needed] If the user changes the margins, the editor will either automatically reposition the line breaks to ensure that all the text will \"flow\" within the margins and remain visible, or provide the typist some convenient way to reposition the line breaks.\n" },
 29+ { 'text': "A soft return is the break resulting from line wrap or word wrap, whereas a hard return is an intentional break, creating a new paragraph.\n" },
3030 ]),
3131 new ParagraphBlock([
32 - { 'text': "The soft returns are usually placed after the ends of complete words, or after the punctuation that follows complete words. However, word wrap may also occur following a hyphen." },
33 - { 'text': "Word wrap following hyphens is sometimes not desired, and can be avoided by using a so-called non-breaking hyphen instead of a regular hyphen. On the other hand, when using word processors, invisible hyphens, called soft hyphens, can also be inserted inside words so that word wrap can occur following the soft hyphens." },
34 - { 'text': "Sometimes, word wrap is not desirable between words. In such cases, word wrap can usually be avoided by using a hard space or non-breaking space between the words, instead of regular spaces." },
35 - { 'text': "OccasionallyThereAreWordsThatAreSoLongTheyExceedTheWidthOfTheLineAndEndUpWrappingBetweenMultipleLines." },
36 - { 'text': "Text might have \ttabs\t in it too. Not all text will end in a line breaking character" }
 32+ { 'text': "The soft returns are usually placed after the ends of complete words, or after the punctuation that follows complete words. However, word wrap may also occur following a hyphen.\n" },
 33+ { 'text': "Word wrap following hyphens is sometimes not desired, and can be avoided by using a so-called non-breaking hyphen instead of a regular hyphen. On the other hand, when using word processors, invisible hyphens, called soft hyphens, can also be inserted inside words so that word wrap can occur following the soft hyphens.\n" },
 34+ { 'text': "Sometimes, word wrap is not desirable between words. In such cases, word wrap can usually be avoided by using a hard space or non-breaking space between the words, instead of regular spaces.\n" },
 35+ { 'text': "OccasionallyThereAreWordsThatAreSoLongTheyExceedTheWidthOfTheLineAndEndUpWrappingBetweenMultipleLines.\n" },
 36+ { 'text': "Text might have \ttabs\t in it too. Not all text will end in a line breaking character\n" }
3737 ])
3838 ]);
3939 var surface = new Surface( $('#es'), doc );

Status & tagging log