diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-11-26 17:51:55 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-11-26 17:51:55 +0000 |
commit | 0de54681d3f7151e2b9b98b64fe36571d47f3658 (patch) | |
tree | c78756114f47c95d43eb307b98202f6d2c984477 | |
parent | 56b445d3928d35e9129387bfddeb64cd64cd421c (diff) | |
download | mandoc-0de54681d3f7151e2b9b98b64fe36571d47f3658.tar.gz |
Allow comma-separated options in tbl(7) tables.
Provides better groff compatibility.
From bentley@.
-rw-r--r-- | tbl.7 | 1 | ||||
-rw-r--r-- | tbl_opts.c | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -135,6 +135,7 @@ in the case of .Ss Options The first line of a table consists of space-separated option keys and modifiers terminated by a semicolon. +For GNU compatibility, option keys can also be separated by commas. If the first line does not have a terminating semicolon, it is assumed that no options are specified and instead a .Sx Layout @@ -182,7 +182,7 @@ again: /* * * options ::= option_list [:space:]* [;][\n] * option_list ::= option option_tail - * option_tail ::= [:space:]+ option_list | + * option_tail ::= [,:space:]+ option_list | * ::= epsilon * option ::= [:alpha:]+ args * args ::= [:space:]* [(] [:alpha:]+ [)] @@ -213,7 +213,7 @@ again: /* buf[i] = '\0'; - while (isspace((unsigned char)p[*pos])) + while (isspace((unsigned char)p[*pos]) || p[*pos] == ',') (*pos)++; /* |