diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-01 11:47:28 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-01 11:47:28 +0000 |
commit | 47cdaf0fdadf72cb7aba9bfecf789e29e518c79b (patch) | |
tree | 56b21c3dc0642c353a4bc759e51b6b3edba6987a /roff.c | |
parent | 40474646e31472973c5c23523544c73599320372 (diff) | |
download | mandoc-47cdaf0fdadf72cb7aba9bfecf789e29e518c79b.tar.gz mandoc-47cdaf0fdadf72cb7aba9bfecf789e29e518c79b.tar.zst mandoc-47cdaf0fdadf72cb7aba9bfecf789e29e518c79b.zip |
Fixed condition of `\}' closing a conditional at the start of the line.
Fixed flushed-out condition of \} causing subsequent arguments to be
truncated, when in fact the whole line should be passed through (if the
conditional succeeds) to the front-end and the \} ignored there.
Added regression test of this behaviour.
Diffstat (limited to 'roff.c')
-rw-r--r-- | roff.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.85 2010/05/29 19:41:47 kristaps Exp $ */ +/* $Id: roff.c,v 1.86 2010/06/01 11:47:28 kristaps Exp $ */ /* * Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -666,10 +666,8 @@ roff_cond_text(ROFF_ARGS) return(ROFFRULE_DENY == rr ? ROFF_IGN : ROFF_CONT); } - if (ep > st && '\\' != *(ep - 1)) { - ep = '\0'; + if (ep == st || (ep > st && '\\' != *(ep - 1))) roffnode_pop(r); - } roffnode_cleanscope(r); return(ROFFRULE_DENY == rr ? ROFF_IGN : ROFF_CONT); |