Clear handlers
This commit is contained in:
parent
4db9037153
commit
1717abb47a
|
@ -19,6 +19,7 @@ proc rewrite(result: var Assertion; uri: string; regex: Regex) =
|
|||
|
||||
runActor("main") do (root: Ref; turn: var Turn):
|
||||
connectStdio(root, turn)
|
||||
var handlers: Table[Handle, RegexAction]
|
||||
during(turn, root, ?UriRunnerConfig) do (handlerspace: Ref, urispace: Ref):
|
||||
|
||||
# sanity chek
|
||||
|
@ -29,7 +30,6 @@ runActor("main") do (root: Ref; turn: var Turn):
|
|||
|
||||
during(turn, handlerspace, dropType(ActionHandler)) do:
|
||||
|
||||
var handlers: Table[Handle, RegexAction]
|
||||
during(turn, handlerspace, ?ActionHandler) do (pat: string; entity: Ref; act: Assertion):
|
||||
# `duringHandle` is a symbol exposed by the `during` macro
|
||||
handlers[duringHandle] = (re(pat, {reIgnoreCase, reStudy}), entity, act,)
|
||||
|
@ -50,5 +50,5 @@ runActor("main") do (root: Ref; turn: var Turn):
|
|||
stderr.writeLine "rewrite failed on ", action
|
||||
if not matched:
|
||||
stderr.writeLine "no actions matched for ", uri
|
||||
|
||||
|
||||
do:
|
||||
clear(handlers)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Package
|
||||
|
||||
version = "20230518"
|
||||
version = "20230623"
|
||||
author = "Emery"
|
||||
description = "A better xdg-open"
|
||||
license = "Unlicense"
|
||||
|
|
Loading…
Reference in New Issue