source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: implement tagging for .Er
@ 2015-07-25 14:23 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-07-25 14:23 UTC (permalink / raw)
  To: source

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-25 14:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-25 14:23 mdocml: implement tagging for .Er schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).