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

man: fix po4a's incorrect handling of \& in doblequotes #540

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Fat-Zer
Copy link
Contributor

@Fat-Zer Fat-Zer commented Nov 12, 2024

Namely do s/\\&"/\\(dq/ only until after we handle all the quotes that might separate commands' arguments.

Closes: #445

Namely do `s/\\&"/\\(dq/` only until after we handle all the quotes that
might separate commands' arguments.

Closes: mquinson#445
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
} else {
die wrap_ref_mod( $ref, "po4a::man", dgettext( "po4a", "Cannot parse command arguments: %s" ), $arguments );
}
$a =~ s/\\&"/\\(dq/g if (defined $a);
push @args, $a;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just reading the code, it seems to me that we could push undef to @args if $a is not defined. If that's impossible, then the test at the end of line 1694 is probably useless.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've assumed it could be undef since there are analogous checks on lines 1682 and 1688. But now I don't see how it actually could. I suppose we can drop all those checks all together, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

po4a modifes the msgid from man page
2 participants