optimize regex

pull/7125/head
Thibault Duplessis 2020-08-16 15:30:41 +02:00
parent 41c435c1dc
commit 8f602ffa82
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ object Node {
.replaceAll("""\r\n""", "\n") // these 3 lines dedup white spaces and new lines
.replaceAll("""(?m)(^ *| +(?= |$))""", "")
.replaceAll("""(?m)^$([\n]+?)(^$[\n]+?^)+""", "$1")
.replaceAll("\\{|\\}", "") // {} are reserved in PGN comments
.replaceAll("[{}]", "") // {} are reserved in PGN comments
}
}
case class Comments(value: List[Comment]) extends AnyVal {