summaryrefslogtreecommitdiff
path: root/bk_man.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2013-03-10 16:58:01 +0000
committerSimon Tatham <anakin@pobox.com>2013-03-10 16:58:01 +0000
commitdcf080aa0e011de37a154e9e8a97dd7546a4a1b1 (patch)
tree891d703334a6d4f4899f058234c52d56cb7bdb3b /bk_man.c
parent1489dc15967970576d08f3f2b22c6e1c939bcbcf (diff)
downloadhalibut-dcf080aa0e011de37a154e9e8a97dd7546a4a1b1.zip
halibut-dcf080aa0e011de37a154e9e8a97dd7546a4a1b1.tar.gz
halibut-dcf080aa0e011de37a154e9e8a97dd7546a4a1b1.tar.bz2
halibut-dcf080aa0e011de37a154e9e8a97dd7546a4a1b1.tar.xz
Add \s for 'strong' text, i.e. bold rather than italics. I've missed
this a couple of times in Halibut markup recently (in particular, it's handy to have a typographical distinction between 'this term is emphasised because it's new' and 'this term is emphasised because I want you to pay attention to it'), so here's an implementation, basically parallel to \e. One slight oddity is that strong text in headings will not be distinguished in some output formats, since they already use bolded text for their headings. [originally from svn r9772]
Diffstat (limited to 'bk_man.c')
-rw-r--r--bk_man.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/bk_man.c b/bk_man.c
index 44f159f..45eb511 100644
--- a/bk_man.c
+++ b/bk_man.c
@@ -590,14 +590,17 @@ static int man_rdaddwc(rdstringc *rs, word *text, word *end,
case word_Normal:
case word_Emph:
+ case word_Strong:
case word_Code:
case word_WeakCode:
case word_WhiteSpace:
case word_EmphSpace:
+ case word_StrongSpace:
case word_CodeSpace:
case word_WkCodeSpace:
case word_Quote:
case word_EmphQuote:
+ case word_StrongQuote:
case word_CodeQuote:
case word_WkCodeQuote:
assert(text->type != word_CodeQuote &&
@@ -607,6 +610,10 @@ static int man_rdaddwc(rdstringc *rs, word *text, word *end,
(attraux(text->aux) == attr_First ||
attraux(text->aux) == attr_Only)) {
quote_props = man_rdaddctrl(rs, "\\fI", quote_props, conf, state);
+ } else if (towordstyle(text->type) == word_Strong &&
+ (attraux(text->aux) == attr_First ||
+ attraux(text->aux) == attr_Only)) {
+ quote_props = man_rdaddctrl(rs, "\\fB", quote_props, conf, state);
} else if ((towordstyle(text->type) == word_Code ||
towordstyle(text->type) == word_WeakCode) &&
(attraux(text->aux) == attr_First ||