URL:
<http://savannah.gnu.org/bugs/?45502>
Summary: .if, .ie, .el syntax issue
Project: GNU troff
Submitted by: carstenkunze
Submitted on: Thu 09 Jul 2015 03:26:27 PM GMT
Severity: 3 - Normal
Item Group: Incorrect behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
Specification: The conditionally processed commands or text need to follow
".if expr", ".ie expr", and ".el" separated by space *on the same line* (i.e.
.ie <expr> <anything>).
Wrong behaviour: If ".if expr", ".ie expr", or ".el" is followed by nothing
on a line the next line is executed conditionally.
This is not compliant with the specified syntax and leads to documents where
this wrong syntax is not noticed (since it works).
Example:
.pl 5
.de A
. ie \\$1
. tm \\$1: true
. el
. tm \\$1: false
..
.A 0
.A 1
The output is
0: false
1: true
whereas the expected (stderr) output would be
0: true
0: false
1: true
1: false
Since the .ie and .el statements have a wrong syntax the following line needs
to be processed unconditionally.
Additionally a warning could be output for the lines with wrong syntax.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45502>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
bug-groff mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-groff