Well I have been playing with the markdown implementation at
http://fossil.instinctive.eu/fossil-scm and libsoldout.

My understanding is that the fossil markdown implementation is "pure" one.

I used the html renders which are included in libsoldout with several extensions enabled.

I recommend to include most if not all extensions. these are (copied verbatim from libsoldout readme.html)

libsoldout extension: PHP-Markdown-like tables

Tables are one of the few extensions that are quite difficult and/or hacky to implement using vanilla Markdown parser and a renderer. Thus a support has been introduced into the parser, using dedicated callbacks:

table_cell, which is called with the span-level contents of the cell;
    table_row, which is called with data returned by table_cell;
    table, which called with data returned by table_row.

The input format to describe tables is taken from PHP-Markdown, and looks like this:

header 1    | header 2      | header 3      | header 4
------------|:-------------:|--------------:|:--------------
first line  |   centered    | right-aligned | left-aligned
second line |   centered    |:   centered  :| left-aligned
third line  |: left-aglined | right-aligned | right-aligned :
column-separator | don't need | to be | aligned in the source
| extra speratators | are allowed | at both ends | of the line |
| correct number of cell per row is not enforced |
| pipe characters can be embedded in cell text by escaping it: \| |


Discount-ish renderer

discount_html and discount_xhtml implement on top of the standard markdown some of the extensions found in Discount.

Actually, all Discount extensions that are not provided here cannot be easily implemented in libsoldout without touching to the parsing code, hence they do not belong strictly to the renderer realm. However some (maybe all, not sure about tables) extensions can be implemented fairly easily with libsoldout by using both a dedicated renderer and some preprocessing to make the extension look like something closer to the original markdown syntax.

Here is a list of all extensions included in these renderers:

image size specitication, by appending " =(width)x(height)" to the link,
    pseudo-protocols in links:
        abbr:description for <abbr title="description">...</abbr>
        class:name for <span class="name">...</span>
        id:name for <a id="name>...</a>
        raw:text for verbatim unprocessed text inclusion
class blocks: blockquotes beginning with %class% will be rendered as a div of the given class(es).

Natasha's own extensions

nat_html and nat_xhtml implement on top of Discount extensions some things that I need to convert losslessly my existing HTML into extended markdown.

Here is a list of these extensions :

    id attribute for headers, using the syntax id#Header text
class attribute for paragraphs, by putting class name(s) between parenthesis at the very beginning of the paragraph <ins> and <del> spans, using respectively ++ and -- as delimiters (with emphasis-like restrictions, i.e. an opening delimiter cannot be followed by a whitespace, and a closing delimiter cannot be preceded by a whitespace).
    plain <span> without attribute, using emphasis-like delimiter |





--
Rene
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to