summaryrefslogtreecommitdiffstats
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-05-14 16:28:23 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-05-14 16:28:23 +0000
commit121fc3d4eff42f9400d7e165b83c068757148a7b (patch)
tree542cf79d7a2a3064093e486984d4bca92800daa0 /mdoc_html.c
parent060aa662da1355a03d3193d7e0dcd9b0bbc33ccc (diff)
downloadmandoc-121fc3d4eff42f9400d7e165b83c068757148a7b.tar.gz
Give -Thtml and -Txhtml the gift of recognising escapes when calculating
widths (e.g., `Bl -tag -width "\s[blahblah]bar"). This has long since been done for -Tascii but escaped noticed with -T[x]html.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 249c3832..3cc952cd 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -288,7 +288,7 @@ a2width(const char *p, struct roffsu *su)
if ( ! a2roffsu(p, su, SCALE_MAX)) {
su->unit = SCALE_BU;
- su->scale = (int)strlen(p);
+ su->scale = html_strlen(p);
}
}
@@ -355,7 +355,7 @@ a2offs(const char *p, struct roffsu *su)
SCALE_HS_INIT(su, INDENT * 2);
else if ( ! a2roffsu(p, su, SCALE_MAX)) {
su->unit = SCALE_BU;
- su->scale = (int)strlen(p);
+ su->scale = html_strlen(p);
}
}
@@ -703,7 +703,7 @@ mdoc_nm_pre(MDOC_ARGS)
{
struct htmlpair tag;
struct roffsu su;
- size_t len;
+ int len;
switch (n->type) {
case (MDOC_ELEM):
@@ -731,10 +731,10 @@ mdoc_nm_pre(MDOC_ARGS)
for (len = 0, n = n->child; n; n = n->next)
if (MDOC_TEXT == n->type)
- len += strlen(n->string);
+ len += html_strlen(n->string);
if (0 == len && m->name)
- len = strlen(m->name);
+ len = html_strlen(m->name);
SCALE_HS_INIT(&su, (double)len);
bufcat_su(h, "width", &su);