diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-10 00:59:06 +0200 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-10 00:59:14 +0200 |
commit | 4db42542867edd537df285abb6d2cdf4f727ec40 (patch) | |
tree | 9c9ff698909f924ff7d7b8651c578b21af2d32d1 /bin | |
parent | dda24a237f14781f168e0c482fab972d9f0a261b (diff) |
grepc: Fix some corner cases
Those two spaces are for handling some insane GNU style. Those
are always spaces, so let's use ' ' instead of '\s\s' to make
sure we don't match two tabs, or things like that.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/grepc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -137,8 +137,8 @@ function grepc_type_typedef_struct_union_enum() { grepc_helper '\.[ch]$' \ '^\s*typedef\s+(struct|union|enum)\b[^;]*$' \ - "^(\s\s)?}\s*$1;" \ - "(?s)^\s*typedef\s+(struct|union|enum)\s+(?:(?!^(\s\s)?}|^\s*typedef).)*^(\s\s)?}\s*$1;"; + "^( )?}\s*$1;" \ + "(?s)^\s*typedef\s+(struct|union|enum)\s+(?:(?!^( )?}|^\s*typedef).)*^( )?}\s*$1;"; } |