bryonjacob / wikimodel

Automatically exported from code.google.com/p/wikimodel
0 stars 0 forks source link

Mediawiki parser doesn't send onEmptyLines when it should #59

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Input:

"
this is one
paragraph

this is another one
"

Actual:

beginDocument
beginParagraph
onWord: [this]
onSpace
onWord: [is]
onSpace
onWord: [one]
onLineBreak
onWord: [paragraph]
endParagraph
beginParagraph
onWord: [this]
onSpace
onWord: [is]
onSpace
onWord: [another]
onSpace
onWord: [one]
endParagraph
endDocument

Expected:

beginDocument
beginParagraph
onWord: [this]
onSpace
onWord: [is]
onSpace
onWord: [one]
onLineBreak
onWord: [paragraph]
endParagraph
onEmptyLines: [1]
beginParagraph
onWord: [this]
onSpace
onWord: [is]
onSpace
onWord: [another]
onSpace
onWord: [one]
endParagraph
endDocument

Note the onEmptyLines: [1].

Original issue reported on code.google.com by vmas...@gmail.com on 4 Sep 2008 at 7:40

GoogleCodeExporter commented 8 years ago

Original comment by thomas.m...@gmail.com on 28 Mar 2010 at 5:52

GoogleCodeExporter commented 8 years ago
Applied patch from Arun Reddy

Original comment by thomas.m...@gmail.com on 28 Mar 2010 at 5:57

GoogleCodeExporter commented 8 years ago
Looks like there is too much now

Original comment by thomas.m...@gmail.com on 29 Sep 2010 at 1:34

GoogleCodeExporter commented 8 years ago
Here is a test to validate (the first example seems wrong to me):
test(
  "paragraph1\n\nparagraph2\n\n\n\nparagraph3\n\n\n\nparagraph4",
  "<p>paragraph1</p>\n" +
  "<p>paragraph2</p>\n" +
  "<div style='height:2em;'></div>\n" +
  "<p>paragraph3</p>");
  "<div style='height:3em;'></div>\n" +
  "<p>paragraph4</p>\n" +

Original comment by thomas.m...@gmail.com on 29 Sep 2010 at 1:48

GoogleCodeExporter commented 8 years ago

Original comment by thomas.m...@gmail.com on 29 Sep 2010 at 1:48