Re: [cowiki-dev] Re: Tables

Archie Campbell <[email protected]>
Newsgroups gmane.comp.php.cowiki.devel
Message-ID <[email protected]>
My work on table syntax appears to be complete. The following in the 
wiki textbox...

<table>
|-
!headparam|headtext1
! headtext2!!headparam|headtext3!! headtext4
|-rowparam
|cellparam|celltext1
| celltext2||cellparam|celltext3|| celltext4
|-
|
celltext5
|cellparam|
celltext6
|cellparam|
celltext7
</table>

is processed by WikiParser to the following. Please put all cells and 
headers within a tr.

            
<table><tr><th headparam>headtext1</th>
<th>headtext2</th>
<th headparam>headtext3</th>
<th>headtext4</th>
</tr>
<tr rowparam><td cellparam>celltext1</td>
<td>celltext2</td>
<td cellparam>celltext3</td>
<td>celltext4</td>
</tr>
<tr><td>celltext5</td>
<td cellparam>celltext6</td>
<td cellparam>celltext7</td>
</tr></table>


that in turn is processed by WikiReverseParser to

<table>
|-
!headparam|
headtext1
!
headtext2
!headparam|
headtext3
!
headtext4
|-rowparam
|cellparam|
celltext1
|
celltext2
|cellparam|
celltext3
|
celltext4
|-
|
celltext5
|cellparam|
celltext6
|cellparam|
celltext7
</table>

which is functionally identical to the original, above. The reverse 
parser likes cells and headers to be found within a table row. In fact, 
it will only see them at all if they reside within a table row 
(<tr>...</tr>) The easiest syntax on eye and parser is...

...
!headparam|
headtext
|cellparam|
celltext
|cellparam|
celltext
...

In this format, celltext may span multiple lines, which allows the 
parser to pick up list syntax and so forth.

Unfortunately, as our parser isn't much more than a bundle of regexes 
applied one after the other, there's no scope for nesting tables. For 
that and other fancy tricks, we'd need recursive descent or something 
similarly thorough.

The xmldoc target is still broken for some table syntax. I have no idea 
how that is even possible, and the content of my last post (ta-raa) 
should be consulted for information regarding that.

Now I'm this far, I'm planning on closing a few issues and bringing the 
xmldoc problem to the front line.

I seem to have solved #152 "strikethrough markup", #174 "underline 
markup", #195 "recognise <b>, <u> & <i> tags" (they are folded to wiki 
syntax in the parser), #196 "justification markup" and #208 "monospace 
markup", while this posting turns #198 "bullets within tables" into an 
alert of new table syntax and a new issue regarding the xmldoc target.

Please could someone peer-review these claims and notify me to close the 
list of issues or turn about and delve back into the parser.

P.S. Is there a plan to move to recursive-descent or otherwise?

P.P.S. Anyone want a wiki markup for a <font> tag?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.