Skip to content

Commit

Permalink
Fix for #79.
Browse files Browse the repository at this point in the history
  • Loading branch information
hcayless committed Nov 15, 2021
1 parent 83634bd commit f758c90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pn-dispatcher/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>info.papyri</groupId>
<artifactId>pn-dispatcher</artifactId>
<packaging>war</packaging>
<version>1.1.13</version>
<version>1.1.14</version>
<name>pn-dispatcher</name>
<url>https://maven.apache.org</url>
<pluginRepositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2345,10 +2345,9 @@ String convertCharProxToRegexSyntax(String prevTerm, String nextTerm, String cha
String numChars = charProxMatcher.group(1);
String operator = charProxMatcher.group(2);
String distRegex = ".{1," + numChars + "}";
// # is conventionally used to indicate word-boundaries on the user-end
prevTerm = prevTerm.replaceAll("#", " ").replace("\\s+", " ");
nextTerm = nextTerm.replaceAll("#", " ").replace("\\s+", " ");
String regex = prevTerm.trim() + distRegex + nextTerm.trim();
// # is conventionally used to indicate word-boundaries on the user-end
regex = regex.replaceAll("#", " ").replace("\\s+", " ");
if(operator.equals("w")) return regex;
// if we are doing an unordered proximity search we also need to invert the terms
String revRegex = nextTerm.trim() + distRegex + prevTerm.trim();
Expand Down

0 comments on commit f758c90

Please sign in to comment.