]> git.cameronkatri.com Git - mandoc.git/commitdiff
Implement the layout specification "a" (left justify with 1em indentation)
authorIngo Schwarze <schwarze@openbsd.org>
Sun, 16 May 2021 23:18:35 +0000 (23:18 +0000)
committerIngo Schwarze <schwarze@openbsd.org>
Sun, 16 May 2021 23:18:35 +0000 (23:18 +0000)
in HTML output mode; before this patch, the indentation was missing.
Terminal output already supported the "a" specifier since 2010.
Issue reported and patch tested by Oliver dot Corff at email dot de.

tbl_html.c

index 8b80e385ec89d4af1713ad02d0907604960cf6ce..6e500dc598bee27700e1b36ba4090c7799e39a4f 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: tbl_html.c,v 1.34 2021/05/16 18:11:20 schwarze Exp $ */
+/*     $Id: tbl_html.c,v 1.35 2021/05/16 23:18:35 schwarze Exp $ */
 /*
  * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2014,2015,2017,2018,2021 Ingo Schwarze <schwarze@openbsd.org>
@@ -247,6 +247,8 @@ print_tbl(struct html *h, const struct tbl_span *sp)
                                html_setfont(h, ESCAPE_FONTBOLD);
                        else if (dp->layout->flags & TBL_CELL_ITALIC)
                                html_setfont(h, ESCAPE_FONTITALIC);
+                       if (dp->layout->pos == TBL_CELL_LONG)
+                               print_text(h, "\\[u2003]");  /* em space */
                        print_text(h, dp->string);
                        html_setfont(h, save_font);
                }