Mylyn WikiText Textile 解析错误?
我正在致力于将 Java 博客平台的纺织插件从一个库 (textile4j) 迁移到 Mylyn 的 WikiText。到目前为止,非常有希望,但我有一些单元测试失败了:
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);
}
基本上,输出显示 WikiText 解析 title
语法存在问题。每个测试的输出如下:
在 #44 中,输出为:
在 #46 中,输出为:
Textpattern Textile Web 小部件正确解析带有类和标题的链接 ("(link)link text(with title)":http://www .example.com/
)和带标题的链接(“链接文本(带标题)”:http://www.example.com/
)简短形式。
是我做错了什么,还是发现了bug?我仍在摸索这个库,但熟悉该库的人可能知道问题所在,可以找到错误,或者可以帮助纠正我。
非常感谢! 蒂姆
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现该错误已被报告...
Eclipse Mylyn WikiText Bugzilla
I found that the bug has been reported...
Eclipse Mylyn WikiText Bugzilla