Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsciiDoc: comments are ignored, breaking markup #308

Closed
paususe opened this issue Jun 28, 2021 · 6 comments
Closed

AsciiDoc: comments are ignored, breaking markup #308

paususe opened this issue Jun 28, 2021 · 6 comments

Comments

@paususe
Copy link
Collaborator

paususe commented Jun 28, 2021

Let's say you have something like this valid AsciiDoc in source.adoc:

some text in English
+
// COMMENT THAT WILL CONFUSE PO4A
+
more text in English

This is rendered by AsciiDoc as:

some text in English

more text in English

After AsciiDoc => gettext => AsciiDoc conversion, this is what you get:

some text in English
+
+
more text in English

Now there are two consecutive "+" signs, which AsciiDoc understands as "the first + sign is to join those lines 1 and 3 in the same paragraph, and I am asked to print the second + sign", so it renders like this:

some text in English
+ more text in English

I am attaching a full example.

po4acomments.zip

@jnavila
Copy link
Collaborator

jnavila commented Aug 8, 2021

It seems that comments management of Po4a does not follow the asciidoc "norm" according to asciidoctor. In the documentation of asciidoctor, it is written that single line comments break the block structures, where as in Po4a tests, a line comment does not split a paragraph.

@jnavila
Copy link
Collaborator

jnavila commented Aug 8, 2021

In fact, I'm not even sure that the behavior is consistent between asciidoc and asciidoctor here.

jnavila added a commit to jnavila/po4a that referenced this issue Sep 14, 2021
Comments must appear translated contents to preserve document
structure.

fix mquinson#307 and mquinson#308
mquinson pushed a commit that referenced this issue Sep 14, 2021
Comments must appear translated contents to preserve document
structure.

fix #307 and #308
@mquinson
Copy link
Owner

Hello all. @jnavila just commited a potential fix for this issue.

@paususe, could you please confirm that this problem is fixed by the current git version?

Thx,

@mquinson
Copy link
Owner

mquinson commented Nov 6, 2021

@paususe do you think that we could close this bug, or is there any remaining issue?
@jnavila what's your feeling here?

Thanks to both of you,
Mt

@jnavila
Copy link
Collaborator

jnavila commented Nov 6, 2021

The changeset passed the modified unittests. But there may be some corner cases in the real world that were missed.

@mquinson
Copy link
Owner

mquinson commented Nov 7, 2021

If so, I think we can close this bug. @paususe feel free to reopen it on need, or to submit another one.

Thanks a lot,

@mquinson mquinson closed this as completed Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants