rehamaltamimi / gwtwiki

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

Parser doesn't support "continuation" in bullet lists #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Create a bullet list in your wiki markup, and add a continuation line,
like this:

* item 1
** item 1.1
*:continuation of item 1.1

2. Render the page.

------------------------------------------------------------

What is the expected output? What do you see instead?
Based on the MediaWiki docs:
http://meta.wikimedia.org/wiki/Help:Wikitext#Organizing_your_writing
(Search the page for the string "Unordered lists are
easy to do" to locate the item of interest.)
I would expect to see a single first level bullet item (item 1), and a
single 2nd level bullet item (item 1.1) followed by a linefeed, and then
the text "continuation of item 1.1", with the same indentation as "item 1.1".
What I see instead is:
a single first level bullet (item 1), followed by a linefeed and a single
2nd level bullet item (item 1.1), followed by a linefeed and a single first
level bullet item, but with the indentation of a 2nd level bullet item.

What version of the product are you using? On what operating system?
3.0.12

Please provide any additional information below.

Please see the screen shot in the attached file.

Original issue reported on code.google.com by steven.b...@gmail.com on 22 Jun 2009 at 2:00

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Axel,

I had posted this previously in the forums, and realized I should have posted 
here.
Then I noticed from the SVN comments that you may have already fixed this. 
Sorry for
any confusion.

Original comment by steven.b...@gmail.com on 22 Jun 2009 at 2:04

GoogleCodeExporter commented 8 years ago
Hi Axel,

I also added the following information to the code review of your most recent 
change
(Revision:  r329  ):

For first level list items:
The continuation is improperly indented. It is indented too much.

For 3rd level list items:
The continuation is improperly indented. It is indented too little.

Example markup:

* item 1
** item 1.1
*:continuation I am indented just right
*item 1.2
*item 2
*:continuation I am indented too much
**item 2.1
***item 2.1.1
*:continuation I am indented too little

Original comment by steven.b...@gmail.com on 22 Jun 2009 at 2:32

Attachments:

GoogleCodeExporter commented 8 years ago
If I try you're example in the Wikipedia Sandbox: 
http://en.wikipedia.org/wiki/Wikipedia:Sandbox

I get this:

<ul> 
<li>item 1
<ul> 
<li>item 1.1</li> 
</ul> 
<dl> 
<dd>continuation I am indented just right</dd> 
</dl> 
</li> 
<li>item 1.2</li> 
<li>item 2
<dl> 
<dd>continuation I am indented too much</dd> 
</dl> 
<ul> 
<li>item 2.1
<ul> 
<li>item 2.1.1</li> 
</ul> 
</li> 
</ul> 
<dl> 
<dd>continuation I am indented too little</dd> 
</dl> 
</li> 
</ul>

My JUnit test case seems to create the same HTML (but with different newline 
characters):

public void testListContinuation03() {
        assertEquals("\n" + "<ul>\n" + "<li>item 1\n" + "<ul>\n" + "<li>item 
1.1</li></ul>\n" + "<dl>\n"
                + "<dd>continuation I am indented just 
right</dd></dl></li>\n" + "<li>item 1.2</li>\n" + "<li>item 2\n" + "<dl>\n"
                + "<dd>continuation I am indented too 
much</dd></dl>\n" + "<ul>\n" + "<li>item 2.1\n" + "<ul>\n"
                + "<li>item 2.1.1</li></ul></li></ul>\n" + "<dl>\n" + 
"<dd>continuation I am indented too little</dd></dl></li></ul>",
                wikiModel.render("* item 1\n" + "** item 1.1\n" + 
"*:continuation I am indented just right\n" + "*item 1.2\n" + "*item 2\n"
                        + "*:continuation I am indented too 
much\n" + "**item 2.1\n" + "***item 2.1.1\n"
                        + "*:continuation I am indented too 
little"));
    }

Original comment by axelclk@gmail.com on 24 Jun 2009 at 7:55

GoogleCodeExporter commented 8 years ago
mea culpa

It looks like you are generating the exact something as WikiPedia. Problem 
solved.

Thank you, and sorry for the trouble. I'll do a better job of checking next 
time.

Original comment by steven.b...@gmail.com on 26 Jun 2009 at 1:37

GoogleCodeExporter commented 8 years ago

Original comment by axelclk@gmail.com on 18 Jul 2009 at 11:08