[ic] [interchange] Fix encode_special_entities filter to prevent heredoc parsing error

Jon Jensen jon at endpoint.com
Fri Nov 12 18:36:33 UTC 2010

On Fri, 12 Nov 2010, Stefan Hornburg (Racke) wrote:

> That's good for now, but I suggest to fix the heredoc bug inside 
> Interchange :-).

It's not actually a bug, if you consider Perl's heredocs to be the 
standard for how heredocs work. Perl heredocs require a newline at the end 
of the token, or you get this error:

Can't find string terminator "END" anywhere before EOF

Text files are arrays of lines, and each line ends with \n. Thus normal 
text files should always end with a newline, or they're broken.

vi, Vim, and nano do that by default, but emacs doesn't. It can be set to 
do so with this in ~/.emacs:

(setq require-final-newline t)


Jon Jensen
End Point Corporation

More information about the interchange-users mailing list