From 5909cbca3fe375aeac1e2247b3f8edbaba32e56e Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Tue, 25 May 2010 12:37:20 +0000 Subject: Modified version of Ingo Schwarze's patch for hyphen-breaking. Breakable hyphens are cued in the back-ends (with ASCII_HYPH) and acted upon in term.c or ignored in html.c. Also cleaned up XML decl printing (no need for extra vars). --- mdoc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mdoc.c') diff --git a/mdoc.c b/mdoc.c index 19920954..e67462e0 100644 --- a/mdoc.c +++ b/mdoc.c @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.137 2010/05/24 13:39:47 schwarze Exp $ */ +/* $Id: mdoc.c,v 1.138 2010/05/25 12:37:20 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -563,6 +563,10 @@ 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; + break; case ' ': if (NULL == ws) ws = c; -- cgit v1.2.3