Wakka/fbdoc parsing discrepancies

Forum for discussion about the documentation project.
counting_pine
Site Admin
Posts: 5856
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Wakka/fbdoc parsing discrepancies

Postby counting_pine » Dec 19, 2011 7:41

I'm mainly starting a thread here to document them. And either to warn wiki editors or perhaps to invite fixes for fbdoc.

I'm mainly coming across this now because I'm hoping to get a working version of the French documentation (which uses some extended characters) in waka format.

There are some differences in table parsing - {{table columns="..." cellpadding="..." cells="..."}}
The cells= param contains the table data, using ';' to separate cells. Escape characters (e.g. &, é) aren't allowed as-is because of the way it's parsed, but it does allow &amp and &eacute (without the ';'). I'd guess this means wakka is checking for a hard-coded set of HTML escapes and appending ';'.

Anyway, this is supported in the online version but not in fbdoc which just copies them verbatim. So it looks like non-printing characters will have to be used instead, e.g. "é". Or switching to the meta HTML format as seen in www.freebasic.net/wiki/CptAscii/raw.

fbdoc could maybe be fixed by scanning for these codes itself and adding a ';' to them, as I suspect Wakka does.
Though another question is how the regular escapes are emitted in non-HTML formats e.g. fbhelp. I don't know what it does currently or whether it's been an issue, but it must presumably convert them to ASCII equivalents, if only in the case of www.freebasic.net/wiki/CptAscii.

Note: I changed some docs recently to remove unfriendly characters and added a few escapes. I may have to think about reverting them now with this in mind.
Last edited by counting_pine on Dec 19, 2011 7:47, edited 2 times in total.
counting_pine
Site Admin
Posts: 5856
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Postby counting_pine » Dec 19, 2011 7:45

(Another tidbit worth knowing is that the {{table}}s can support minor formatting using HTML commands e.g. <b></b>. Unfortunately fbdoc doesn't support this either, desirable though it may sometimes be.
Implementing these may be overkill, particularly since it still doesn't give as much control as we may like over the formatting in them.
So tables where formatting is really desired are probably best upgrading as with www.freebasic.net/wiki/CptAscii/raw, as mentioned above.)

Return to “Documentation”

Who is online

Users browsing this forum: No registered users and 2 guests