]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: support TAB as a delimiter between --option and description
authorPádraig Brady <P@draigBrady.com>
Sun, 25 Jan 2026 19:52:59 +0000 (19:52 +0000)
committerPádraig Brady <P@draigBrady.com>
Sun, 25 Jan 2026 21:19:45 +0000 (21:19 +0000)
* src/system.h (oputs_): Treat a single TAB as an option delimiter.
Some zh translations use this delimiter format.

src/system.h

index 80779640db4673d2af69653190352a4854dc5d3d..3695954db92d77ae6c01b14e2c6ce47011267a9a 100644 (file)
@@ -576,10 +576,11 @@ oputs_ (MAYBE_UNUSED char const* program, char const *option)
 
   /* Set highlighted text up to spacing after the full option text.
      Any single space is included in highlighted text,
-     double space or newline terminates the option text.  */
+     double space or TAB or newline terminates the option text.  */
   char const *desc_text = option_text + anchor_len;
   while (*desc_text && *desc_text != '\n'
-         && (! isspace (*desc_text) || ! isspace (*(desc_text + 1))))
+         && (! isspace (*desc_text)
+             || (*desc_text != '\t' && ! isspace (*(desc_text + 1)))))
     desc_text++;
 
   /* write spaces before option text. */