diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2022-05-14 15:21:05 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2022-05-14 15:21:05 -0400 |
| commit | 563ecf332ee6e79f0cc7361e00a09963723fd402 (patch) | |
| tree | 1d3867a1f83465c5519614e9fc51fe525a5a6eb2 | |
| parent | 2988080c3277bddfa2a2c4ec7768e748e2d8c20b (diff) | |
Allow optional colon for :Tag:foo
| -rw-r--r-- | pattern.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -513,13 +513,14 @@ static pat_t *_bp_simplepattern(const char *str, const char *end, bool inside_st return new_pat(BP_END_OF_FILE, start, ++str, 0, 0); return new_pat(BP_END_OF_LINE, start, str, 0, 0); } - // Tagged pattern :Tag: pat... + // Tagged pattern :Tag:pat... case ':': { const char *name = str; str = after_name(name, end); if (str == name) parse_err(start, str, "There should be an identifier after this ':'"); size_t namelen = (size_t)(str - name); + (void)matchchar(&str, ':', false, end); // Optional second colon for :Tag:foo instead of :Tag(foo) pat_t *p = bp_simplepattern(str, end); if (p) str = p->end; |
