aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/html.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-18 19:22:21 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-18 19:22:21 +0000
commitc1f44d16f40aa0b6a571293bf1153e34ca40bedf (patch)
treed4b62a97aeaa6ccd4076702fec22886ad13cad3c /html.h
parent6506abee45c903b6cd5093a2bf6ece5ac7aed4e3 (diff)
downloadmandoc-c1f44d16f40aa0b6a571293bf1153e34ca40bedf.tar.gz
mandoc-c1f44d16f40aa0b6a571293bf1153e34ca40bedf.tar.zst
mandoc-c1f44d16f40aa0b6a571293bf1153e34ca40bedf.zip
Make HTML output more human readable by overhauling line break logic
around tags and by introducing some simple indentation. No change of HTML semantics intended.
Diffstat (limited to 'html.h')
-rw-r--r--html.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/html.h b/html.h
index ac82683b..1a4d559b 100644
--- a/html.h
+++ b/html.h
@@ -1,4 +1,4 @@
-/* $Id: html.h,v 1.75 2017/01/17 15:32:43 schwarze Exp $ */
+/* $Id: html.h,v 1.76 2017/01/18 19:22:22 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -95,6 +95,9 @@ struct html {
#define HTML_NOSPLIT (1 << 7) /* do not break line before .An */
#define HTML_SPLIT (1 << 8) /* break line before .An */
#define HTML_NONEWLINE (1 << 9) /* No line break in nofill mode. */
+#define HTML_NLDONE (1 << 10) /* Just started a new line of HTML. */
+ int indent; /* current output indentation level */
+ int noindent; /* indent disabled by <pre> */
struct tagq tags; /* stack of open tags */
struct rofftbl tbl; /* current table */
struct tag *tblt; /* current open table scope */