aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-07-27 07:09:41 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-07-27 07:09:41 +0000
commit5a69146534b5566f6abd37c3808daff6754a4c79 (patch)
treeb2c876ce9e39f1569c42a5315bce4ddf44708b07 /mdoc.c
parent9b45ea9374c6a536a053d5e474e212ae1bf3b1e1 (diff)
downloadmandoc-5a69146534b5566f6abd37c3808daff6754a4c79.tar.gz
mandoc-5a69146534b5566f6abd37c3808daff6754a4c79.tar.zst
mandoc-5a69146534b5566f6abd37c3808daff6754a4c79.zip
First, roff_res() has no need to invoke ROFF_RERUN: since it's executed
before any other roff processing occurs, it's Ok to just let it do its thing and pass through. Also, make sure this function is ALWAYS called, not just when first_string is defined. Second, add a new function, roff_parsetext(), that post-processes non-macro lines. This, for the time being, amounts to detecting soft hyphens. This fixes a long-standing bug in that -man now has proper hyphen breaking!
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/mdoc.c b/mdoc.c
index 786ef67e..4d3c5fb6 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.191 2011/07/25 15:37:00 kristaps Exp $ */
+/* $Id: mdoc.c,v 1.192 2011/07/27 07:09:41 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -755,11 +755,6 @@ mdoc_ptext(struct mdoc *m, int line, char *buf, int offs)
ws = NULL;
for (c = end = buf + offs; *c; c++) {
switch (*c) {
- case '-':
- if (mandoc_hyph(buf + offs, c))
- *c = ASCII_HYPH;
- ws = NULL;
- break;
case ' ':
if (NULL == ws)
ws = c;