diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-06 12:37:17 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-06 12:37:17 +0000 |
commit | 8953dce6410913db1ce531b8f37750ee72bc45e7 (patch) | |
tree | adc1699cfeb140a4e6efb7ef95be6681941ea2fe /html.c | |
parent | 25b9ffe82ac5592b33241ae447d947f4dca24f7f (diff) | |
download | mandoc-8953dce6410913db1ce531b8f37750ee72bc45e7.tar.gz |
Give -T[x]html `Bk -words' capability.
Diffstat (limited to 'html.c')
-rw-r--r-- | html.c | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -393,8 +393,15 @@ print_otag(struct html *h, enum htmltag tag, t = NULL; if ( ! (HTML_NOSPACE & h->flags)) - if ( ! (HTML_CLRLINE & htmltags[tag].flags)) - putchar(' '); + if ( ! (HTML_CLRLINE & htmltags[tag].flags)) { + /* Manage keeps! */ + if ( ! (HTML_KEEP & h->flags)) { + if (HTML_PREKEEP & h->flags) + h->flags |= HTML_KEEP; + putchar(' '); + } else + printf(" "); + } /* Print out the tag name and attributes. */ @@ -511,8 +518,15 @@ print_text(struct html *h, const char *word) break; } - if ( ! (h->flags & HTML_NOSPACE)) - putchar(' '); + if ( ! (HTML_NOSPACE & h->flags)) { + /* Manage keeps! */ + if ( ! (HTML_KEEP & h->flags)) { + if (HTML_PREKEEP & h->flags) + h->flags |= HTML_KEEP; + putchar(' '); + } else + printf(" "); + } assert(word); if ( ! print_encode(h, word, 0)) |