diff --git a/src/main/scala/view/Markdown.scala b/src/main/scala/view/Markdown.scala
index 2e53c94..e7fdf02 100644
--- a/src/main/scala/view/Markdown.scala
+++ b/src/main/scala/view/Markdown.scala
@@ -78,7 +78,7 @@
val html = super.toHtml(rootNode)
if(enableIssueLink){
// convert marked issue id to link.
- html.replaceAll("#\\{\\{\\{\\{([0-9]+)\\}\\}\\}\\}",
+ html.replaceAll("#\\{\\{\\{\\{(\\d+)\\}\\}\\}\\}",
"#$1".format(context.path, repository.owner, repository.name))
} else html
}
@@ -113,7 +113,7 @@
// mark issue id to link
val startIndex = node.getStartIndex
val text2 = if(enableIssueLink && startIndex > 0 && markdown.charAt(startIndex - 1) == '#'){
- text1.replaceFirst("^([0-9]+)", "{{{{$0}}}}")
+ text1.replaceFirst("^(\\d+)", "{{{{$0}}}}")
} else text1
if (abbreviations.isEmpty) {
diff --git a/src/main/scala/view/helpers.scala b/src/main/scala/view/helpers.scala
index 42e697c..eb655e1 100644
--- a/src/main/scala/view/helpers.scala
+++ b/src/main/scala/view/helpers.scala
@@ -34,7 +34,7 @@
// escape HTML tags
.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """)
// convert issue id to link
- .replaceAll("(^|\\W)#([0-9]+)(\\W|$)", "$1#$2$3".format(context.path, repository.owner, repository.name))
+ .replaceAll("(^|\\W)#(\\d+)(\\W|$)", "$1#$2$3".format(context.path, repository.owner, repository.name))
// convert commit id to link
.replaceAll("(^|\\W)([a-f0-9]{40})(\\W|$)", "$1$2$3").format(context.path, repository.owner, repository.name))