mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 20:20:21 +01:00
mobile: update fts5-html lib
This commit is contained in:
committed by
Abdullah Atta
parent
4ddc21d783
commit
8a283baeaf
@@ -110719,10 +110719,10 @@ index 0000000..4e379d2
|
||||
+0.0.2
|
||||
diff --git a/node_modules/react-native-quick-sqlite/sqlite3-fts5-html/fts5-html.c b/node_modules/react-native-quick-sqlite/sqlite3-fts5-html/fts5-html.c
|
||||
new file mode 100755
|
||||
index 0000000..a426025
|
||||
index 0000000..21a952f
|
||||
--- /dev/null
|
||||
+++ b/node_modules/react-native-quick-sqlite/sqlite3-fts5-html/fts5-html.c
|
||||
@@ -0,0 +1,2677 @@
|
||||
@@ -0,0 +1,2685 @@
|
||||
+/*
|
||||
+** 2023-12-25
|
||||
+**
|
||||
@@ -110736,6 +110736,7 @@ index 0000000..a426025
|
||||
+*/
|
||||
+#include "fts5-html.h"
|
||||
+#include <ctype.h>
|
||||
+#include <stdio.h>
|
||||
+#include <string.h>
|
||||
+
|
||||
+#ifndef SQLITE_CORE
|
||||
@@ -113032,10 +113033,17 @@ index 0000000..a426025
|
||||
+ htmlEscape *e = p->pEscape;
|
||||
+
|
||||
+ int iActualStart = p->iOriginalCur;
|
||||
+ // This breaks the trigram tokenizer
|
||||
+ // if (p->iPlainCur > iStart) {
|
||||
+ // return SQLITE_ERROR;
|
||||
+ // }
|
||||
+
|
||||
+ // if the cursor in plain text is ahead of the position
|
||||
+ // shared by the actual tokenizer, that means we are moving
|
||||
+ // by a different offset instead of from token to token.
|
||||
+ // This is especially the case in trigram tokenizers that
|
||||
+ // iterate over the same word multiple times, each time
|
||||
+ // moving by offset 1.
|
||||
+ if (p->iPlainCur > iStart) {
|
||||
+ // move back the cursor in the actual document
|
||||
+ iActualStart = iActualStart - (p->iPlainCur - iStart);
|
||||
+ }
|
||||
+
|
||||
+ for (int i = p->iPlainCur; i < iStart; i++) {
|
||||
+ iActualStart += e->pLengths[i];
|
||||
@@ -113400,6 +113408,7 @@ index 0000000..a426025
|
||||
+ return fts5HtmlInit(db);
|
||||
+}
|
||||
+#endif
|
||||
\ No newline at end of file
|
||||
diff --git a/node_modules/react-native-quick-sqlite/sqlite3-fts5-html/fts5-html.h b/node_modules/react-native-quick-sqlite/sqlite3-fts5-html/fts5-html.h
|
||||
new file mode 100755
|
||||
index 0000000..ab224e9
|
||||
|
||||
Reference in New Issue
Block a user