ignore_and_comments_output.init 766 B

123456789101112131415161718192021222324252627282930313233
  1. use strict;
  2. use vars qw(%commands_conversion);
  3. sub convert_comment_command($$$)
  4. {
  5. my $self = shift;
  6. my $cmdname = shift;
  7. my $command = shift;
  8. if ($command->{'args'} and $command->{'args'}->[0]) {
  9. return $self->xml_comment($command->{'args'}->[0]->{'text'});
  10. } else {
  11. return '';
  12. }
  13. }
  14. texinfo_register_command_formatting('c', \&convert_comment_command);
  15. texinfo_register_command_formatting('comment', \&convert_comment_command);
  16. sub convert_ignore_command($$$$)
  17. {
  18. my $self = shift;
  19. my $cmdname = shift;
  20. my $command = shift;
  21. my $content = shift;
  22. # FIXME should the spacing be set differently for raw commands?
  23. return $self->xml_comment(" ".$content."\n");
  24. }
  25. texinfo_register_command_formatting('ignore', \&convert_ignore_command);