gbranden pushed a commit to branch master
in repository groff.

commit b244cb723ba12cac016082c7809e936cee6991a4
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Oct 18 09:00:42 2026 -0500

    src/include/symbol.h: Annotate.
    
    An noteworthy consequence of groff's symbol class design is that there's
    no bit of state tracking whether a symbol name whose collection was
    attempted contained an invalid component (such as a prohibited character
    code point).  An empty symbol is treated much the same as an invalid one
    by the formatter, for example.
    
    One _could_ test a `symbol` object for "pure invalidity" with `is_null()
    && !is_empty()`.  But it appears that no groff maintainer has ever
    adopted that pattern.
---
 src/include/symbol.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/include/symbol.h b/src/include/symbol.h
index 76936a42c..e523ef12d 100644
--- a/src/include/symbol.h
+++ b/src/include/symbol.h
@@ -39,7 +39,7 @@ public:
   int operator !=(symbol) const;
   const char *contents() const;
   bool contains(char) const;
-  bool is_null() const;
+  bool is_null() const; // empty _or_ invalid
   bool is_empty() const;
   size_t json_length() const;
   const char *json_extract() const;

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

Reply via email to