Now removing special character sequences from full text index. * Closes #39.
h3rald h3rald@h3rald.com
Sun, 08 May 2016 14:32:54 +0200
1 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
lib/utils.nim
→
lib/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: