diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-10 21:42:02 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-10 21:42:02 +0000 |
commit | 92fc4a31da7eb79879434d883684209266ac3ff2 (patch) | |
tree | e95551d6c9052f1c92423aee19c07cd2adb86de7 /roff.7 | |
parent | b33e04fa7bbe5f17c54a8a302bf93d8a56784800 (diff) | |
download | mandoc-92fc4a31da7eb79879434d883684209266ac3ff2.tar.gz |
Fix adding some minimal intelligence to conditional parser. See roff.7
for what's supported. This simplified the roff_cond() function quite
nicely. From a bug report by uqs@.
Added regression test based on bug-report example by uqs@.
Also added ROFF_DEBUG to see what the hell the parser is actually doing.
Obviously turned off by default.
Diffstat (limited to 'roff.7')
-rw-r--r-- | roff.7 | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -173,8 +173,19 @@ BODY... BODY .Ed .Pp -COND is a conditional (for the time being, this always evaluates to -false). +COND is a conditional statement. +roff allows for complicated conditionals; mandoc is much simpler. +At this time, mandoc supports only +.Sq n , +evaluating to true; +and +.Sq t , +.Sq e , +and +.Sq o , +evaluating to false. +All other invocations are read up to the next end of line or space and +evaluate as false. .Pp If the BODY section is begun by an escaped brace .Sq \e{ , |