gbranden pushed a commit to branch master
in repository groff.

commit 4b0e0405dfec56879552ffae2488d9423566ad8d
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed May 7 10:52:44 2025 -0500

    [mdoc]: Address Savannah #65763 (`\?` comparison).
    
    * tmac/doc.tmac (Bd): Fix code style nit.  Perform "strict" string
      comparison when using formatted output comparison operator to peform
      matching on macro argument.  See subsection/node "Operators in
      Conditionals" in groff's Texinfo manual.
    
    See <https://savannah.gnu.org/bugs/?65763>.
    
    groff.info:
         Surround the comparands with '\?' to avoid formatting them; this
         causes them to be compared character by character, as with string
         comparisons in other programming languages.
    
              .ie "\?|\?"\?\fR|\fP\?" true
              .el false
                  => false
    
         Since GNU 'troff' reads comparands protected with '\?' in copy mode
         (*note Copy Mode::), they need not even be valid 'groff' syntax.
         The escape character is still lexically recognized, however, and
         consumes the next character.
---
 ChangeLog     | 10 ++++++++++
 tmac/doc.tmac | 10 +++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 264b76d09..0bb60c4f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-05-07  G. Branden Robinson <[email protected]>
+
+       * tmac/doc.tmac (Bd): Fix code style nit.  Perform "strict"
+       string comparison when using formatted output comparison
+       operator to peform matching on macro argument.  See
+       subsection/node "Operators in Conditionals" in groff's Texinfo
+       manual.
+
+       See <https://savannah.gnu.org/bugs/?65763>.
+
 2025-05-07  G. Branden Robinson <[email protected]>
 
        [mdoc]: Revise font customization feature.
diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index 81a6f6441..23e257160 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -3077,7 +3077,7 @@
 .  nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
 .  nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
 .
-.  ie        "\$1"-literal" \{\
+.  ie        "\?\$1\?"\?-literal\?" \{\
 .    ds doc-display-type-stack\n[doc-display-depth] literal
 .    nr doc-display-ft-stack\n[doc-display-depth] \n[.f]
 .    nr doc-display-ps-stack\n[doc-display-depth] \n[.ps]
@@ -3090,22 +3090,22 @@
 .      ta T 8n
 .    nf
 .  \}
-.  el \{ .ie "\$1"-filled" \{\
+.  el \{ .ie "\?\$1\?"\?-filled\?" \{\
 .    ds doc-display-type-stack\n[doc-display-depth] filled
 .    ad b
 .    fi
 .  \}
-.  el \{ .ie "\$1"-ragged" \{\
+.  el \{ .ie "\?\$1\?"\?-ragged\?" \{\
 .    ds doc-display-type-stack\n[doc-display-depth] ragged
 .    na
 .    fi
 .  \}
-.  el \{ .ie "\$1"-centered" \{\
+.  el \{ .ie "\?\$1\?"\?-centered\?" \{\
 .    ds doc-display-type-stack\n[doc-display-depth] centered
 .    ad c
 .    fi
 .  \}
-.  el \{ .ie "\$1"-unfilled" \{\
+.  el \{ .ie "\?\$1\?"\?-unfilled\?" \{\
 .    ds doc-display-type-stack\n[doc-display-depth] unfilled
 .    nf
 .  \}

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to