diff --git a/src/main/scala/gitbucket/core/util/StringUtil.scala b/src/main/scala/gitbucket/core/util/StringUtil.scala index f6e4bc0..76cc389 100644 --- a/src/main/scala/gitbucket/core/util/StringUtil.scala +++ b/src/main/scala/gitbucket/core/util/StringUtil.scala @@ -86,8 +86,9 @@ *@param message the message which may contains issue id * @return the iterator of issue id */ - def extractIssueId(message: String): Iterator[String] = - "(^|\\W)#(\\d+)(\\W|$)".r.findAllIn(message).matchData.map(_.group(2)) + def extractIssueId(message: String): Seq[String] = + "(^|\\W)#(\\d+)(\\W|$)".r + .findAllIn(message).matchData.map(_.group(2)).toSeq.distinct /** * Extract close issue id like ```close #issueId ``` from the given message. @@ -95,7 +96,8 @@ * @param message the message which may contains close command * @return the iterator of issue id */ - def extractCloseId(message: String): Iterator[String] = - "(?i)(?