diff --git a/src/Component/Converter/Matcher.php b/src/Component/Converter/Matcher.php index a9e8537..b4566a1 100644 --- a/src/Component/Converter/Matcher.php +++ b/src/Component/Converter/Matcher.php @@ -77,7 +77,14 @@ public function duplicateWithNewKey(string $newPrimaryKey): self $matcher = new self(); $matcher->scope = $this->scope; $matcher->locale = $this->locale; - $matcher->matches = explode($this->separator, $newPrimaryKey); + $matcher->matches = $this->matches; + $matcher->matches[1] = $newPrimaryKey; + if (count(explode($this->separator, $newPrimaryKey)) > 1) { + $matcher->matches = explode($this->separator, $newPrimaryKey); + } + + // obelink-xml-v3 + //$matcher->matches = explode($this->separator, $newPrimaryKey); return $matcher; }