Mylyn WikiText Textile parsing error?

邮差的信 提交于 2019-12-11 22:54:14

问题


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


回答1:


I found that the bug has been reported...

Eclipse Mylyn WikiText Bugzilla



来源:https://stackoverflow.com/questions/8702131/mylyn-wikitext-textile-parsing-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!