mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
013018f105
commit
0a6dc87fcd
@ -143,7 +143,7 @@ class FTS:
|
|||||||
text = 'books_text.searchable_text'
|
text = 'books_text.searchable_text'
|
||||||
if highlight_start is not None and highlight_end is not None:
|
if highlight_start is not None and highlight_end is not None:
|
||||||
if snippet_size is not None:
|
if snippet_size is not None:
|
||||||
text = f'snippet({fts_table}, 0, "{highlight_start}", "{highlight_end}", "…", {max(1, min(snippet_size, 64))})'
|
text = f'snippet("{fts_table}", 0, "{highlight_start}", "{highlight_end}", "…", {max(1, min(snippet_size, 64))})'
|
||||||
else:
|
else:
|
||||||
text = f'highlight("{fts_table}", 0, "{highlight_start}", "{highlight_end}")'
|
text = f'highlight("{fts_table}", 0, "{highlight_start}", "{highlight_end}")'
|
||||||
query = 'SELECT {0}.id, {0}.book, {0}.format, {1} FROM {0} '
|
query = 'SELECT {0}.id, {0}.book, {0}.format, {1} FROM {0} '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user