bug-texinfo
[Top][All Lists]
Advanced

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

Re: [bug #43126] Macros defined through @include make a spurious space b


From: Patrice Dumas
Subject: Re: [bug #43126] Macros defined through @include make a spurious space before @end macro
Date: Mon, 20 Oct 2014 00:31:58 +0200
User-agent: Mutt/1.5.20 (2009-12-10)

On Tue, Sep 02, 2014 at 09:17:56AM +0200, Vincent Belaïche wrote:
> Just as a few side comments:
> 
> * it is probably worth checking whether @rmacro has the same issue

It has, it is almost the same as @macro.

> * probably the perl script uses some hard-coded "\n", rather than
> some `endofline' property of the file from which the macro was read.

I do not know how to find that file property in perl. 

> The
> only rule should be that *within a same file* you have to be
> consistent.

Indeed that would make sense.

I had a look at the code and indeed \n is hardcoded in a few places.
Interestingly, \r is also present in some regex.  There are also some
chomp, I don't know if they remove \r too or not.

My understanding was that perl does some "magic" with end of lines, \n
may be LF on UNIXes, but also CRLF on windows.

Anyway, I don't really know how to handle that correctly, nor can I
really test on windows.

I have a test file with dos end of lines, which exhibits most of the 
constructs, maybe I tested on it, but it may not cover everything?  
Everywhere \n is hardcoded without \r, things could indeed break.
It would certainly be even more relevant to test with old mac end
of lines with only CR, as \n may match with CRLF bt not with CR only.

Are there other issues or only the macro one?

-- 
Pat



reply via email to

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