Mylyn WikiText Textile parsing error?
Asked Answered
N

1

0

I'm working on migrating a textile plugin for a java blogging platform from one library (textile4j) to Mylyn's WikiText. So far very promising, but I have some unit tests that are failing:

public void testLinksSyntax44() {
    String in = "\"link text(with title)\":http://example.com/";
    String out = "<p><a href=\"http://example.com/\" title=\"with title\">link text</a></p>";
    textile.parse(in);
    String content = writer.toString();
    assertEquals(out, content);
}

public void testLinksSyntax46() {
    String in = "\"(link)link text(with title)\":http://example.com/";
    String out = "<p><a href=\"http://example.com/\" class=\"link\" title=\"with title\">link text</a></p>";
    textile.parse(in);
    String content = writer.toString();
    assertEquals(out, content);
}

Basically, the output is showing a problem with WikiText parsing the title syntax. The output for each test is as follows:

In #44, the output is: <p><a href="http://example.com/">link text(with title)</a></p>

In #46, the output is: <p><a href="http://example.com/" class="link">link text(with title)</a></p>

The Textpattern Textile web widget correctly parses the link with class and title ("(link)link text(with title)":http://www.example.com/) and the link with title ("link text(with title)":http://www.example.com/) short forms.

Am I doing something wrong, or did I find a bug? I'm still groking the library, but it might be that one familiar with the library knows the problem, can find the error, or can help correct me.

Much thanks! Tim

Natural answered 2/1, 2012 at 14:44 Comment(1)
I'm using the standalone builds of Mylyn WikiText BTW from Maven Central, v1.3. The code appears to be pushed from github and I have PMs to both devs (one the original, one a clone) at github.Natural
N
0

I found that the bug has been reported...

Eclipse Mylyn WikiText Bugzilla

Natural answered 3/1, 2012 at 2:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.