bryonjacob / wikimodel

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

XWiki parser fails to parse some list syntax #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The following content isn't parsed as a list but as some bold content by
wikimodel:

(space)(space)* item1
(space)(space)* item2

Original issue reported on code.google.com by vmas...@gmail.com on 26 May 2008 at 3:19

GoogleCodeExporter commented 8 years ago
Change the XWIki  parser to make possible to write lists with spaces at the 
beginning
of the line.  Regular expression: … \s*(["*"]+)\s+

Original comment by mikhail....@gmail.com on 13 Jun 2008 at 1:20

GoogleCodeExporter commented 8 years ago

Original comment by mikhail....@gmail.com on 29 Jun 2008 at 8:26

GoogleCodeExporter commented 8 years ago
Here's a patch:

Index: src/main/java/org/wikimodel/wem/xwiki/javacc/XWikiScanner.jj
===================================================================
--- src/main/java/org/wikimodel/wem/xwiki/javacc/XWikiScanner.jj        
(revision 192)
+++ src/main/java/org/wikimodel/wem/xwiki/javacc/XWikiScanner.jj        
(working copy)
@@ -93,7 +93,7 @@

 <DEFAULT, INITIAL_CONTEXT> TOKEN:
 {
-      <#LI: ( ("*")+ | ( "1" | "*" )+ "." ) (<SPACE>)* >
+      <#LI: (<SPACE>)* ( ("*")+ | ( "1" | "*" )+ "." ) (<SPACE>)* >
     | <#HEADER: ( "1" ("." "1" ) {0, 5} ) (<SPACE>)* >
     | <#ESCAPE: ( "\\" ~["\\", " ", "\t", "\n", "\r"] ) >
     | <#BR: "\\\\" >

Original comment by vmas...@gmail.com on 24 Jul 2008 at 5:14

GoogleCodeExporter commented 8 years ago
Thank you for the patch!

Original comment by mikhail....@gmail.com on 24 Jul 2008 at 8:03