all repos — litestore @ 3042481d23416a3338c1404002bec25fecb27006

A minimalist nosql document store.

Now removing special character sequences from full text index.
* Closes #39.
h3rald h3rald@h3rald.com
Sun, 08 May 2016 14:32:54 +0200
commit

3042481d23416a3338c1404002bec25fecb27006

parent

adc1bfddded01e699452a5ea8c4f70bf645c2721

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M lib/utils.nimlib/utils.nim

@@ -137,7 +137,8 @@ result["tags"] = %tags

proc toPlainText*(s: string): string = var tags = peg"""'<' [^>]+ '>'""" - return s.replace(tags) + var special_chars = peg"""\*\*+ / \_\_+ / \-\-+ / \#\#+ / \+\++ / \~\~+ / \`\`+ """ + return s.replace(tags).replace(special_chars) proc checkIfBinary*(binary:int, contenttype:string): int = if binary == -1 and contenttype.isBinary: