diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-01-13 05:23:18 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-01-13 05:23:18 +0000 |
commit | f46c36d9584352b2dfc4f14ac9328c9420d84a88 (patch) | |
tree | 7747179c2a6074896f4308d6f5e95ae63f15f8cc | |
parent | c19bc1871a4ec09b10be3d754810146cca4e731e (diff) | |
download | mandoc-f46c36d9584352b2dfc4f14ac9328c9420d84a88.tar.gz |
Remove the implicit display feature of .Lk because it was inconsistent
across output devices, counter-intuitive, and resulted in ugly
output for many real-world manual pages. Always format even long
links in-line. I already committed a similar change to groff.
OK jmc@, bentley@, and the original author
of the feature, Werner Lemberg <wl@gnu.org>.
-rw-r--r-- | mdoc_man.c | 9 | ||||
-rw-r--r-- | mdoc_term.c | 8 | ||||
-rw-r--r-- | regress/mdoc/Lk/noarg.out_ascii | 5 |
3 files changed, 2 insertions, 20 deletions
@@ -1547,7 +1547,6 @@ static int pre_lk(DECL_ARGS) { const struct roff_node *link, *descr, *punct; - int display; if ((link = n->child) == NULL) return 0; @@ -1570,12 +1569,6 @@ pre_lk(DECL_ARGS) } /* Link target. */ - display = man_strlen(link->string) >= 26; - if (display) { - print_line(".RS", MMAN_Bk_susp); - print_word("6n"); - outflags |= MMAN_nl; - } font_push('B'); print_word(link->string); font_pop(); @@ -1585,8 +1578,6 @@ pre_lk(DECL_ARGS) print_word(punct->string); punct = punct->next; } - if (display) - print_line(".RE", MMAN_nl); return 0; } diff --git a/mdoc_term.c b/mdoc_term.c index 2f0728ff..c3e48d0b 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1940,7 +1940,6 @@ static int termp_lk_pre(DECL_ARGS) { const struct roff_node *link, *descr, *punct; - int display; if ((link = n->child) == NULL) return 0; @@ -1966,11 +1965,6 @@ termp_lk_pre(DECL_ARGS) } /* Link target. */ - display = term_strlen(p, link->string) >= 26; - if (display) { - term_newln(p); - p->tcol->offset += term_len(p, p->defindent + 1); - } term_fontpush(p, TERMFONT_BOLD); term_word(p, link->string); term_fontpop(p); @@ -1981,8 +1975,6 @@ termp_lk_pre(DECL_ARGS) term_word(p, punct->string); punct = punct->next; } - if (display) - term_newln(p); return 0; } diff --git a/regress/mdoc/Lk/noarg.out_ascii b/regress/mdoc/Lk/noarg.out_ascii index dd5ee4de..5172f5fd 100644 --- a/regress/mdoc/Lk/noarg.out_ascii +++ b/regress/mdoc/Lk/noarg.out_ascii @@ -5,9 +5,8 @@ NNAAMMEE DDEESSCCRRIIPPTTIIOONN multiple arguments _t_h_e _b_s_d_._l_v _p_r_o_j_e_c_t: hhttttpp::////wwwwww..bbssdd..llvv//, _G_N_U _t_r_o_f_f: - hhttttpp::////wwwwww..ggnnuu..oorrgg//ssooffttwwaarree//ggrrooffff//, - two arguments _m_a_n_d_o_c_,: hhttttpp::////mmddooccmmll..bbssdd..llvv// one argument - hhttttpp::////wwwwww..ooppeennbbssdd..oorrgg//,, no argument + hhttttpp::////wwwwww..ggnnuu..oorrgg//ssooffttwwaarree//ggrrooffff//, two arguments _m_a_n_d_o_c_,: + hhttttpp::////mmddooccmmll..bbssdd..llvv// one argument hhttttpp::////wwwwww..ooppeennbbssdd..oorrgg//,, no argument end of test document |