bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @comment in @example can cancel indent of example


From: Gavin Smith
Subject: Re: @comment in @example can cancel indent of example
Date: Sun, 8 Feb 2015 15:43:19 +0000

On Fri, Feb 6, 2015 at 5:11 PM, Gavin Smith <address@hidden> wrote:
> I just noticed for the Info output of the following,
>
> @example
> address@hidden
>
> x
> aaa
> bb
> @end example,
>
> there is no indent for the line with "x" at all. The output looks like
>
> ==================
> This is text.info, produced by makeinfo version 5.2dev from text.texi.
>
>      yyyyyyyyyyyyyyyyy
> x
>      aaa
>      bb
>
>
> Tag Table:
>
> End Tag Table
> ==================

Well, I think a patch like the following is needed:

Index: Plaintext.pm
===================================================================
--- Plaintext.pm        (revision 6106)
+++ Plaintext.pm        (working copy)
@@ -1573,9 +1573,8 @@ sub _convert($$)
       if ($root->{'text'} =~ /\f/) {
         $result = _get_form_feeds($root->{'text'}) .$result;
       }
-      $self->_add_text_count($result);
-      $self->_add_lines_count(1);
-      return $result;
+      return $self->_count_added($formatter->{'container'},
+               $formatter->{'container'}->add_text($result));
     } else {
       return '';
     }


The formatter module Unfilled.pm didn't know it was at the beginning
of a new line, because it had never been passed text to merge with a
newline in it. I will check if this change gets through the test
suite, when I can.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]