diff options
author | Eric Wong <e@80x24.org> | 2021-02-13 02:15:03 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-02-27 16:21:17 -0400 |
commit | c9ff20cbef45d32e4b46a78f081312543c781428 (patch) | |
tree | 3cd646feb522f78335187a361a4004e49c7b597f /examples | |
parent | b4603182d50456dc410093efd4d921078559fd42 (diff) | |
download | public-inbox-c9ff20cbef45d32e4b46a78f081312543c781428.tar.gz |
With an example such as: something before "quoted phrase" something after The Xapian will now see: [ "something before", "quoted phrase", "something after" ] whereas before it would see: [ "something before", "quoted", "phrase", "something after" ] which should improve search results accuracy when looking up commits by commit title (subject).
Diffstat (limited to 'examples')
-rw-r--r-- | examples/cgit-commit-filter.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/cgit-commit-filter.lua b/examples/cgit-commit-filter.lua index 8f9d3eb5..9614c944 100644 --- a/examples/cgit-commit-filter.lua +++ b/examples/cgit-commit-filter.lua @@ -32,7 +32,8 @@ function filter_close() html(buffer) else html('<a href="' .. u .. '?x=t&q=') - html_url_arg('"' .. buffer .. '"') + s = string.gsub(buffer, '"', '""') + html_url_arg('"' .. s .. '"') html('"><tt>') html_txt(buffer) html('</tt></a>') |