From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id b63b3678; for ; Sat, 25 Jul 2015 09:23:39 -0500 (EST) Date: Sat, 25 Jul 2015 09:23:39 -0500 (EST) Message-Id: <10341886282056846917.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: implement tagging for .Er X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- implement tagging for .Er Modified Files: -------------- mdocml: mdoc_term.c Revision Data ------------- Index: mdoc_term.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/mdoc_term.c,v retrieving revision 1.322 retrieving revision 1.323 diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.322 -r1.323 --- mdoc_term.c +++ mdoc_term.c @@ -95,6 +95,7 @@ static int termp_bx_pre(DECL_ARGS); static int termp_cd_pre(DECL_ARGS); static int termp_d1_pre(DECL_ARGS); static int termp_eo_pre(DECL_ARGS); +static int termp_er_pre(DECL_ARGS); static int termp_ex_pre(DECL_ARGS); static int termp_fa_pre(DECL_ARGS); static int termp_fd_pre(DECL_ARGS); @@ -146,7 +147,7 @@ static const struct termact termacts[MDO { termp_cd_pre, NULL }, /* Cd */ { termp_bold_pre, NULL }, /* Cm */ { NULL, NULL }, /* Dv */ - { NULL, NULL }, /* Er */ + { termp_er_pre, NULL }, /* Er */ { termp_tag_pre, NULL }, /* Ev */ { termp_ex_pre, NULL }, /* Ex */ { termp_fa_pre, NULL }, /* Fa */ @@ -2269,6 +2270,19 @@ termp_under_pre(DECL_ARGS) { term_fontpush(p, TERMFONT_UNDER); + return(1); +} + +static int +termp_er_pre(DECL_ARGS) +{ + + if (n->sec == SEC_ERRORS && + (n->parent->tok == MDOC_It || + (n->parent->tok == MDOC_Bq && + n->parent->parent->parent->tok == MDOC_It)) && + ! tag_get(n->child->string, 0, 1)) + tag_put(n->child->string, 0, 1, p->line); return(1); } -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv