source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: `Sm' no longer produces a linebreak when used in `Bd'.
@ 2010-10-10  9:59 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2010-10-10  9:59 UTC (permalink / raw)
  To: source

Log Message:
-----------
`Sm' no longer produces a linebreak when used in `Bd'.

Modified Files:
--------------
    mdocml:
        TODO
        mdoc_html.c
        mdoc_term.c

Revision Data
-------------
Index: TODO
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/TODO,v
retrieving revision 1.58
retrieving revision 1.59
diff -LTODO -LTODO -u -p -r1.58 -r1.59
--- TODO
+++ TODO
@@ -109,9 +109,6 @@
   is just "o\bo".
   see for example OpenBSD ksh(1)
 
-- .Sm should *not* produce as a blank line in .Bd -literal
-  see for example "Brace expansion" in OpenBSD ksh(1)
-
 - The characters "|" and "\*(Ba" should never be bold,
   not even in the middle of a word, e.g. ".Cm b\*(Bac" in
   "mknod [-m mode] name b|c major minor"
Index: mdoc_html.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_html.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.110 -r1.111
--- mdoc_html.c
+++ mdoc_html.c
@@ -1323,6 +1323,8 @@ mdoc_bd_pre(MDOC_ARGS)
 		 * anyway, so don't sweat it.
 		 */
 		switch (nn->tok) {
+		case (MDOC_Sm):
+			/* FALLTHROUGH */
 		case (MDOC_br):
 			/* FALLTHROUGH */
 		case (MDOC_sp):
@@ -1603,7 +1605,16 @@ mdoc_sm_pre(MDOC_ARGS)
 
 	assert(n->child && MDOC_TEXT == n->child->type);
 	if (0 == strcmp("on", n->child->string)) {
-		/* FIXME: no p->col to check... */
+		/* 
+		 * FIXME: no p->col to check.  Thus, if we have
+		 *  .Bd -literal
+		 *  .Sm off
+		 *  1 2
+		 *  .Sm on
+		 *  3
+		 *  .Ed
+		 * the "3" is preceded by a space.
+		 */
 		h->flags &= ~HTML_NOSPACE;
 		h->flags &= ~HTML_NONOSPACE;
 	} else
Index: mdoc_term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v
retrieving revision 1.192
retrieving revision 1.193
diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.192 -r1.193
--- mdoc_term.c
+++ mdoc_term.c
@@ -1584,6 +1584,8 @@ termp_bd_pre(DECL_ARGS)
 		 * anyway, so don't sweat it.
 		 */
 		switch (nn->tok) {
+		case (MDOC_Sm):
+			/* FALLTHROUGH */
 		case (MDOC_br):
 			/* FALLTHROUGH */
 		case (MDOC_sp):
--
 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:[~2010-10-10  9:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-10  9:59 mdocml: `Sm' no longer produces a linebreak when used in `Bd' kristaps

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).