diff --git a/pkg/multipmuri/pmbodyparser/pmbodyparser.go b/pkg/multipmuri/pmbodyparser/pmbodyparser.go index d000f3ea3..138e38d3c 100644 --- a/pkg/multipmuri/pmbodyparser/pmbodyparser.go +++ b/pkg/multipmuri/pmbodyparser/pmbodyparser.go @@ -57,14 +57,14 @@ func ParseString(body string) (Relationships, []error) { } var ( - fixesRegex, _ = regexp.Compile(`(?im)^\s*(fix|fixes)\s*[:= ]\s*([^\s,]+)\s*$`) - blocksRegex, _ = regexp.Compile(`(?im)^\s*(block|blocks)\s*[:= ]\s*([^\s,]+)\s*$`) - closesRegex, _ = regexp.Compile(`(?im)^\s*(close|closes)\s*[:= ]\s*([^\s,]+)\s*$`) - parentOfRegex, _ = regexp.Compile(`(?im)^\s*(parent of|parent)\s*[:= ]\s*([^\s,]+)\s*$`) - partOfRegex, _ = regexp.Compile(`(?im)^\s*(part of|part)\s*[:= ]\s*([^\s,]+)\s*$`) - relatedWithRegex, _ = regexp.Compile(`(?im)^\s*(related|related with)\s*[:= ]\s*([^\s,]+)\s*$`) - addressesRegex, _ = regexp.Compile(`(?im)^\s*(address|addresses)\s*[:= ]\s*([^\s,]+)\s*$`) - dependsOnRegex, _ = regexp.Compile(`(?im)^\s*(depend|depends|depend on|depends on)\s*[:= ]\s*([^\s,]+)\s*$`) + fixesRegex, _ = regexp.Compile(`(?im)^\s*(fix|fixes)\s*[:= ]\s*([^\s,.]+).?\s*$`) + blocksRegex, _ = regexp.Compile(`(?im)^\s*(block|blocks)\s*[:= ]\s*([^\s,.]+).?\s*$`) + closesRegex, _ = regexp.Compile(`(?im)^\s*(close|closes)\s*[:= ]\s*([^\s,.]+).?\s*$`) + parentOfRegex, _ = regexp.Compile(`(?im)^\s*(parent of|parent)\s*[:= ]\s*([^\s,.]+).?\s*$`) + partOfRegex, _ = regexp.Compile(`(?im)^\s*(part of|part)\s*[:= ]\s*([^\s,.]+).?\s*$`) + relatedWithRegex, _ = regexp.Compile(`(?im)^\s*(related|related with)\s*[:= ]\s*([^\s,.]+).?\s*$`) + addressesRegex, _ = regexp.Compile(`(?im)^\s*(address|addresses)\s*[:= ]\s*([^\s,.]+).?\s*$`) + dependsOnRegex, _ = regexp.Compile(`(?im)^\s*(depend|depends|depend on|depends on)\s*[:= ]\s*([^\s,.]+).?\s*$`) ) func RelParseString(context multipmuri.Entity, body string) (Relationships, []error) {