> >   $_      $x        Type of Match Implied    Matching Code
> >   ======  =====     =====================    =============
> >   Any     Code<$>   scalar sub truth         match if $x($_)

How about making paragraphs that have a line like the divider one above
special? By simply parsing the ===== lines, it's easy to make it a table
for formatters that understand tables, and you have full control over
how things look in plain text.

It would mean being a little more careful with the lines, as they should
indicate column width, and not just end at the end of the column header.
Podchecker can of course be made to warn if there is non-whitespace in a
column that had an = in the divider (now: column specification) line.

     $_      $x        Type of Match Implied    Matching Code
 -   ======  =====     =====================    =============
 +   ======  ========  =======================  ==================
     Any     Code<$>   scalar sub truth         match if $x($_)

An HTML formatter could generate code like:

<table>
    <tr>
        <th><tt>$_</tt></th>
        <th><tt>$x</tt></th>
        <th><tt>Type of Match Implied</tt></th>
        <th><tt>Matching Code</tt></th>
    </tr>
    <tr>
        <td><tt>Any</tt></td>
        <td><tt>Code&lt;$&gt;</tt></td>
        <td><tt>scalar sub truth</tt></td>
        <td><tt>match if $x($_)</tt></td>
    </tr>
    <!-- ... -->
</table>

I haven't thought of a solution for non-verbatim cells yet. I'm not
convinced that they are needed.


Juerd

Reply via email to