Package: halibut
Version: 1.2-2

(I didn't find a bug tracker for Halibut upstream, so I'm reporting this
here and I put Simon Tatham / you into the CC.)

A simple test file fails to properly parse a \cfg command as the first
non-empty line of a file, if the first line is empty.

===
~/test/halibug$ halibut --version
Halibut, version 1.2
~/test/halibug$ cat test1.src

\cfg{chapter}{Section}

~/test/halibug$ halibut --precise test1.src --text
test1.src:2:1: command `cfg' unexpected in mid-paragraph
test1.src:2:5: brace character unexpected in mid-paragraph
test1.src:2:14: brace character unexpected in mid-paragraph
~/test/halibug$ cat output.txt
chapterSection

~/test/halibug$
===

However, if there are two or more empty lines at the file's beginning,
or none, it works as expected.

===
~/test/halibug$ cat test1.src



\cfg{chapter}{Section}

~/test/halibug$ halibut --precise test1.src --text
~/test/halibug$ cat test1.src


\cfg{chapter}{Section}

~/test/halibug$ halibut --precise test1.src --text
~/test/halibug$ cat test1.src

\cfg{chapter}{Section}

~/test/halibug$ halibut --precise test1.src --text
test1.src:2:1: command `cfg' unexpected in mid-paragraph
test1.src:2:5: brace character unexpected in mid-paragraph
test1.src:2:14: brace character unexpected in mid-paragraph
~/test/halibug$ cat test1.src
\cfg{chapter}{Section}

~/test/halibug$ halibut --precise test1.src --text
~/test/halibug$
===

(I'll be shortly reporting another bug (a crash), but wanted to get this
one out first -- and they do not seem to be related.)

Regards,
ecm

Reply via email to