We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff17885 commit 9e6bb77Copy full SHA for 9e6bb77
directive-handler/src/main/scala/scala/cli/directivehandler/DirectiveHandlers.scala
@@ -47,9 +47,10 @@ final case class DirectiveHandlers[T](
47
)
48
49
def ++(other: DirectiveHandlers[T]): DirectiveHandlers[T] =
50
- if (other.handlers.isEmpty) this
51
- else if (handlers.isEmpty) other
52
- else DirectiveHandlers(handlers ++ other.handlers)
+ DirectiveHandlers(
+ handlers = handlers ++ other.handlers,
+ customHandler = key => customHandler(key).orElse(other.customHandler(key))
53
+ )
54
55
def addCustomHandler(f: String => Option[DirectiveHandler[T]]): DirectiveHandlers[T] =
56
copy(
0 commit comments