mquinson/po4a

Asciidoc / Only first line of a multiline attributes is recognized as assignment

suddenfall opened this issue · 7 comments

When I define a multiline attribute in an adoc file like this:

:myvar: {var1} + \
{var2} + \
{var3}

I got an po-file output like this:

#. type: Plain text
#: accessories.adoc:13
msgid "{var2} + \\ {var3}"
msgstr ""

At first, I thought, it is an issue with the recognition of "+ \". After further tests I am of the opinion that the attribute is not recognized as a multiline definition. If the definition were recognized as multiline, then the output
{var2} + \\ {var3}
should not be in the po-file.

bug.zip

There's an issue here: asciidoctor and legacy asciidoc do not manage multi-line attributes the same way:

Only the legacy version is handled right now.

Wow, that's very remarkable how extensively you research everything. I appreciate that!

I'm not a Perl programmer, but I took a look at your pull request. Wow again, the bug fix is even implemented with test cases. Very nice.

I have also have checked out and tested your pull request. And yes, it works perfectly.

Thanks for your fast bug fixing!

Should I close this issue or is someone else doing it?

Fast indeed. But alas, the tests do not cover the cases when the attribute is not managed by po4a, and there was of course a bug on this part. I will push a fix shortly.

For the issue, please let the merge of the PR close it automatically.

[A]las, the tests do not cover the cases when the attribute is not managed by po4a, and there was of course a bug on this part. I will push a fix shortly.

Maybe you could commit this change directly w/o resorting on a PR? Would you like to have the push right, @jnavila, or do you prefer to rely on PR?

Hi, I'm (very selfishly) only interested in the asciidoc support and not breaking it for git manpages translation. If this qualifies for push right, then ok. I'll still use PR in order to "document" the changes anyway.

Hello, this definitely qualifies for the push right. If there is an issue blocking you, I don't want to be the blocking point preventing you from fixing it by yourself. I'm confident that you won't overuse it, but I feel better when you can fix problems even if my laptop gets stolen or something.