aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/scala/spray/boilerplate/Generator.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/scala/spray/boilerplate/Generator.scala b/src/main/scala/spray/boilerplate/Generator.scala
index f124691..0dc79ec 100644
--- a/src/main/scala/spray/boilerplate/Generator.scala
+++ b/src/main/scala/spray/boilerplate/Generator.scala
@@ -16,10 +16,12 @@ object Generator {
def formatNumSpace(num: Int) = num.formatted("%d")
def replaceInPattern(pattern: String)(idx: Int): String =
// in likely identifiers replace by '04' etc.
- pattern.replaceAll("(?<=\\w)(?<!\\d)(?<!##)1(?!\\d)", formatNum0(idx))
+ pattern.replaceAll("(?<=\\w)(?<!\\d)(?<!##)2(?!\\d)", formatNum0(idx + 1))
+ .replaceAll("(?<=\\w)(?<!\\d)(?<!##)1(?!\\d)", formatNum0(idx))
.replaceAll("(?<=\\w)(?<!\\d)(?<!##)0(?!\\d)", formatNum0(idx - 1))
// in other places replace by ' 4' etc.
+ .replaceAll("(?<!\\w)(?<!\\d)(?<!##)2(?!\\d)", formatNumSpace(idx + 1))
.replaceAll("(?<!\\w)(?<!\\d)(?<!##)1(?!\\d)", formatNumSpace(idx))
.replaceAll("(?<!\\w)(?<!\\d)(?<!##)0(?!\\d)", formatNumSpace(idx - 1))