[Po4a-devel] asciidoc table support

Anders Nawroth anders at neotechnology.com
Mon Sep 10 11:01:51 UTC 2012


Hi!

I just found out about po4a recently, and it matches my use case very
well which is wonderful!

Anyhow, I'm having a problem with the AsciiDoc support.
It seems it simply doesn't parse table differently (marking them as Plain text).
Which of course ruins the markup completely (as it's rewrapped).

I tried fixing this by editing the Text.pm file, matching the table
markup in line 376
(of the current trunk version of the file), like so:
 ($line =~ m/^(\/{4,}|\+{4,}|-{4,}|\.{4,}|\*{4,}|_{4,}|={4,}|~{4,}|\|(=){4,})$/))
{
i.e., adding |\|(=){4,}
and then modifying the listing block code to make it handle tables as
well (line 398):
 } elsif ($t eq "-" || $t eq "|") {

This makes po4a-gettextize output a po file that looks perfect to me.
The content of the table is recognized as a delimited block, set to no-wrap,
and the text has explicit \n's for the newlines.

The problem comes when running po4a-translate.
The table markup is still rewrapped in the result!

Can anybody give me a hint as to what I'm missing here?

I attached example data in a file.

/anders

-- 
Anders Nawroth [anders at neotechnology.com]
Skype: anders.nawroth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asciidoc-example
Type: application/octet-stream
Size: 4167 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20120910/12bd2169/attachment.obj>


More information about the Po4a-devel mailing list