Zhomart / wikimodel

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

Confluence 1.0 - The wrong result when parse a string #209

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When i using confluence 1.0 syntax of wikimode to parsing 
"F7:C8kkkkkkkkkkkkkkkkkkkkkkkkkk" string, the result which i received an URI 
token. I think it is wrong result, the correct result is  a word token
The parsing results were wrong when i parsed "00:1E:68:42:F7:C8", 
"00:1F:3C:0B:F4:49"

Original issue reported on code.google.com by ha...@exoplatform.com on 29 Dec 2011 at 8:19

GoogleCodeExporter commented 9 years ago

Original comment by thomas.m...@gmail.com on 29 Dec 2011 at 11:33

GoogleCodeExporter commented 9 years ago
"F7:C8kkkkkkkkkkkkkkkkkkkkkkkkkk": follow http://www.ietf.org/rfc/rfc3986.txt, 
it is an URI

"00:1E:68:42:F7:C8" is text but the parser works incorrectly. Propose new patch 
for fixing this bug.

Original comment by quan...@exoplatform.com on 16 Jan 2012 at 6:47

Attachments:

GoogleCodeExporter commented 9 years ago
What's important is how Confluence itself behave with theses examples. Did you 
checked (don't have any confluence to test) ?

Original comment by thomas.m...@gmail.com on 16 Jan 2012 at 8:04

GoogleCodeExporter commented 9 years ago
Behaviour of Confluence Enterprise wiki 3.5.13 : 
- "F7:C8kkkkkkkkkkkkkkkkkkkkkkkkkk" ---> text
- "00:1E:68:42:F7:C8"  ---> text
- "F4:49:00:1F:3C:0B" (start with a char) ---> text
- "F4:49 00:1F:3C:0B" ---> text 
- "http://example.com" ---> external link
While in Wikimodel: 
- "F7:C8kkkkkkkkkkkkkkkkkkkkkkkkkk" ---> link
- "00:1E:68:42:F7:C8"  ---> text "00:1E:68:42" + link("F7:C8")
- "F4:49:00:1F:3C:0B" (start with a char) ---> link("F4:49") + 
text(":00:1F:3C:0B")
- "F4:49 00:1F:3C:0B" ---> link("F4:49") + text(" 00:1F:3C:0B")
- "http://example.com" ---> external link

My patch(wikimodel-issue-209.patch) just change the parser to consider 
"00:1E:68:42:F7:C8" as text instead of link + text.

I think the best solution is change the parser behaviour to the same way as 
Confluence. I will propose new patch for it if necessary. 

Original comment by quan...@exoplatform.com on 16 Jan 2012 at 8:47

GoogleCodeExporter commented 9 years ago
Since the reference is Confluence behavior itself (I don't think there is a 
complete spec of the Confluence syntax, or is it ?) we should follow latest 
Confluence behavior as much as possible (even when it's not logical or does not 
fully follow URI specs).

Original comment by thomas.m...@gmail.com on 16 Jan 2012 at 8:59

GoogleCodeExporter commented 9 years ago
Issue 148 has been merged into this issue.

Original comment by thomas.m...@gmail.com on 16 Jan 2012 at 9:17

GoogleCodeExporter commented 9 years ago
Propose new patch wikimodel-issue-209.patch. The patch includes: 
  * Change ConfluenceWikiScanner.jj to Parse the uri as normal text. 
  * Edit junit test cases to adapt the Confluence behaviour.

Original comment by quan...@exoplatform.com on 17 Jan 2012 at 10:38

Attachments:

GoogleCodeExporter commented 9 years ago
Applied patch, thanks !

Original comment by thomas.m...@gmail.com on 17 Jan 2012 at 10:46