Fixed marks grouping and coloring for simultaneous multi marks definition
This commit is contained in:
parent
e97454c4a5
commit
474bef65cb
@ -311,7 +311,7 @@ def parse_marker_spec(ftype: str, parts: Sequence[str]) -> Tuple[str, Union[str,
|
||||
def toggle_marker(func: str, rest: str) -> FuncArgsType:
|
||||
parts = rest.split(maxsplit=1)
|
||||
if len(parts) != 2:
|
||||
raise ValueError('{} if not a valid marker specification'.format(rest))
|
||||
raise ValueError('{} is not a valid marker specification'.format(rest))
|
||||
ftype, spec = parts
|
||||
parts = spec.split()
|
||||
return func, list(parse_marker_spec(ftype, parts))
|
||||
|
||||
@ -56,7 +56,7 @@ def marker_from_multiple_regex(regexes: Iterable[Tuple[int, str]], flags: int =
|
||||
for match in pat.finditer(text):
|
||||
left.value = match.start()
|
||||
right.value = match.end() - 1
|
||||
grp = next(k for k, v in match.groupdict().items())
|
||||
grp = match.lastgroup
|
||||
color.value = color_map[grp]
|
||||
yield
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user