From 1c62f42ca2f43ac9f721ae986079d2bb30403fd3 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 14 Apr 2017 19:35:22 +0000 Subject: Show long .Lk URIs in like an indented display, similar to groff. Suggested by bentley@. --- mdoc_term.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'mdoc_term.c') diff --git a/mdoc_term.c b/mdoc_term.c index 18183a31..259f9a2e 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.347 2017/04/14 18:25:04 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.348 2017/04/14 19:35:22 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012-2017 Ingo Schwarze @@ -1993,6 +1993,7 @@ static int termp_lk_pre(DECL_ARGS) { const struct roff_node *link, *descr; + int display; if (NULL == (link = n->child)) return 0; @@ -2008,10 +2009,19 @@ termp_lk_pre(DECL_ARGS) term_word(p, ":"); } + display = term_strlen(p, link->string) >= 26; + if (display) { + term_newln(p); + p->offset += term_len(p, p->defindent + 1); + } + term_fontpush(p, TERMFONT_BOLD); term_word(p, link->string); term_fontpop(p); + if (display) + term_newln(p); + return 0; } -- cgit v1.2.3-56-ge451