Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Mar 23, 2015 · 5 comments
Open

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 4 Sep 2008 at 7:40

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 28 Mar 2010 at 5:52

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Applied patch from Arun Reddy

Original comment by [email protected] on 28 Mar 2010 at 5:57

@GoogleCodeExporter
Copy link
Author

Looks like there is too much now

Original comment by [email protected] on 29 Sep 2010 at 1:34

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 29 Sep 2010 at 1:48

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 29 Sep 2010 at 1:48

  • Added labels: MediaWikiSyntax

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant