source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: eliminate white space after opening and before closing
Date: Wed, 23 Aug 2017 15:30:15 -0500 (EST)	[thread overview]
Message-ID: <7509035958700419884.enqueue@fantadrom.bsd.lv> (raw)

Log Message:
-----------
eliminate white space after opening and before closing punctuation

Modified Files:
--------------
    mandoc:
        eqn_term.c
    mandoc/regress/eqn/fromto:
        precedence.out_ascii
    mandoc/regress/eqn/over:
        precedence.out_ascii
    mandoc/regress/eqn/subsup:
        precedence.out_ascii

Revision Data
-------------
Index: precedence.out_ascii
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/eqn/fromto/precedence.out_ascii,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/eqn/fromto/precedence.out_ascii -Lregress/eqn/fromto/precedence.out_ascii -u -p -r1.2 -r1.3
--- regress/eqn/fromto/precedence.out_ascii
+++ regress/eqn/fromto/precedence.out_ascii
@@ -4,6 +4,6 @@ N\bNA\bAM\bME\bE
      s\bsu\bub\bbs\bsu\bup\bp-\b-p\bpr\bre\bec\bce\bed\bde\ben\bnc\bce\be - precedence of subscripts and superscripts
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-     initial text _\bX_(_\ba_)^_\bc^ ; X_a\ba^_\bc ; (_\bX_1^2)_(_\ba__\bc^_\be)^(_\bo__\br^_\bs) final text
+     initial text _\bX_(_\ba_)^_\bc^; X_a\ba^_\bc; (_\bX_1^2)_(_\ba__\bc^_\be)^(_\bo__\br^_\bs) final text
 
 OpenBSD                          July 6, 2017                          OpenBSD
Index: eqn_term.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/eqn_term.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Leqn_term.c -Leqn_term.c -u -p -r1.14 -r1.15
--- eqn_term.c
+++ eqn_term.c
@@ -90,8 +90,14 @@ eqn_box(struct termp *p, const struct eq
 	if (bp->font != EQNFONT_NONE)
 		term_fontpush(p, fontmap[(int)bp->font]);
 
-	if (bp->text != NULL)
+	if (bp->text != NULL) {
+		if (strchr("!\"'),.:;?]}", *bp->text) != NULL)
+			p->flags |= TERMP_NOSPACE;
 		term_word(p, bp->text);
+		if (*bp->text != '\0' && strchr("\"'([{",
+		    bp->text[strlen(bp->text) - 1]) != NULL)
+			p->flags |= TERMP_NOSPACE;
+	}
 
 	/* Special box types. */
 
Index: precedence.out_ascii
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/eqn/over/precedence.out_ascii,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lregress/eqn/over/precedence.out_ascii -Lregress/eqn/over/precedence.out_ascii -u -p -r1.5 -r1.6
--- regress/eqn/over/precedence.out_ascii
+++ regress/eqn/over/precedence.out_ascii
@@ -4,7 +4,7 @@ N\bNA\bAM\bME\bE
      o\bov\bve\ber\br-\b-p\bpr\bre\bec\bce\bed\bde\ben\bnc\bce\be - precedence of the fraction operator
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-     initial text 1 + _\bx + (_\bx^2)/2 + (_\bx^3)/(2 * 3) ; _\ba^/_\bc~ ; a\ba/c\bc ;
-     sqrt(_\ba)/sqrt(_\bc) final text
+     initial text 1 + _\bx + (_\bx^2)/2 + (_\bx^3)/(2 * 3); _\ba^/_\bc~; a\ba/c\bc; sqrt(_\ba)/sqrt(_\bc)
+     final text
 
 OpenBSD                          July 6, 2017                          OpenBSD
Index: precedence.out_ascii
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/eqn/subsup/precedence.out_ascii,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lregress/eqn/subsup/precedence.out_ascii -Lregress/eqn/subsup/precedence.out_ascii -u -p -r1.3 -r1.4
--- regress/eqn/subsup/precedence.out_ascii
+++ regress/eqn/subsup/precedence.out_ascii
@@ -4,6 +4,6 @@ N\bNA\bAM\bME\bE
      s\bsu\bub\bbs\bsu\bup\bp-\b-p\bpr\bre\bec\bce\bed\bde\ben\bnc\bce\be - precedence of subscripts and superscripts
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-     initial text (_\bx^)_(1_)^2- + (_\be~)^((_\bx^)__\bs<->) ; I_I\bI^_\bI + I^(I\bI__\bI) final text
+     initial text (_\bx^)_(1_)^2- + (_\be~)^((_\bx^)__\bs<->); I_I\bI^_\bI + I^(I\bI__\bI) final text
 
 OpenBSD                          July 6, 2017                          OpenBSD
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

                 reply	other threads:[~2017-08-23 20:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7509035958700419884.enqueue@fantadrom.bsd.lv \
    --to=schwarze@mandoc.bsd.lv \
    --cc=source@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).