Zhomart / wikimodel

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

Confluence - Support list in table #211

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
For now, with c\Confluence syntax, wikimodel doesn't support list in table 
explicitly. It's nice if list can be shown in the table with out place in 
verbatim block.

Please review my proposed patch for this one.

Original issue reported on code.google.com by hie...@exoplatform.com on 16 Jan 2012 at 8:31

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Wow this is a big patch, you should avoid include 
org.wikimodel.wem/src/main/java/org/wikimodel/wem/confluence/javacc/*.java 
files in patches since theses are generated from the jj file. Makes the patch 
harder to review.

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

GoogleCodeExporter commented 9 years ago
Ok I've just remove them from my patch

Original comment by hie...@exoplatform.com on 16 Jan 2012 at 9:07

Attachments:

GoogleCodeExporter commented 9 years ago
I just applied your patch but your first new test does not pass. I get

<div class='wikimodel-document'>
<table><tbody>
  <tr><td><ul>
  <li>Item 1</li>
</ul>
</td><td><strong> Item 2</strong></td></tr>
</tbody></table>
</div>

instead of the expected

<div class='wikimodel-document'>
<table><tbody>
  <tr><td><ul>
  <li>Item 1</li>
</ul>
</td><td><ul>
  <li>Item 2</li>
</ul>
</td></tr>
</tbody></table>
</div>

Note that I regenerated the Java class from the jj file.

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

GoogleCodeExporter commented 9 years ago
Have you try again, it works normally on my side. I patched it, recompiled the 
jj file and run the unit test.

Original comment by hie...@exoplatform.com on 16 Jan 2012 at 9:34

GoogleCodeExporter commented 9 years ago
Look at your unit test result, I doubt the generation didn't work properly, you 
can check again by svn st?

Original comment by hie...@exoplatform.com on 16 Jan 2012 at 9:36

GoogleCodeExporter commented 9 years ago
Rechecking with the latest patch.

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

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Right, I used JavaCC plugin to build it.

Original comment by hie...@exoplatform.com on 16 Jan 2012 at 10:43

GoogleCodeExporter commented 9 years ago
You did not used RebuildScanners.xml ant script to build the java files, right ?

This is supposed to be the standard way of generate then, it modify the jj file 
itself in insert standard stuff and align others.

In this case what append is that this script make sure to copy what's in 
initial-context in the default-context so since all your modifications to 
default-context are lost.

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

GoogleCodeExporter commented 9 years ago
Ah, I got it, when I first use Ant to build it, I'm not success. 
Building always fail at:
<javacc target="${input.file}" javacchome="${javacc.home}" unicodeinput="true" 
/>

Original comment by hie...@exoplatform.com on 16 Jan 2012 at 10:55

GoogleCodeExporter commented 9 years ago
Here is what I do: I executed

ant -f RebuildScanners.xml

in org.wikimodel.wem/ folder.

Also I think some ant plugin is required. In my case (ubuntu) I simply install 
ant-optional package.

Original comment by thomas.m...@gmail.com on 16 Jan 2012 at 11:03

GoogleCodeExporter commented 9 years ago
Thank, I did it. It's failure now.... 
But you know, Confluence syntax have some different behavior  with the others. 
So how to fix this case?

Original comment by hie...@exoplatform.com on 16 Jan 2012 at 11:14

GoogleCodeExporter commented 9 years ago
Should I do some modification on WikiGrammarReplacement.xml ?

Original comment by hie...@exoplatform.com on 16 Jan 2012 at 11:17

GoogleCodeExporter commented 9 years ago
If you are sure your modifications should go only in <DEFAULT_CONTEXT> and not 
in <INITIAL_CONTEXT> you  can put what's different between the two outside of 
the // <initial-context> and // <default-context> groups and the corresponding 
getters outside of the // <getters> group.

Original comment by thomas.m...@gmail.com on 16 Jan 2012 at 11:38

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks, I understood now, my patch is modified as you said and it works with 
ant build now.

Original comment by hie...@exoplatform.com on 17 Jan 2012 at 7:42

Attachments:

GoogleCodeExporter commented 9 years ago
Cool thanks, taking care of it.

Original comment by thomas.m...@gmail.com on 17 Jan 2012 at 7:48

GoogleCodeExporter commented 9 years ago

Original comment by thomas.m...@gmail.com on 17 Jan 2012 at 7:57