-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now special characters can work with keywords
- Loading branch information
1 parent
85a4dc2
commit 80d5ded
Showing
9 changed files
with
87 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
SYS: Loaded: users-account.db | ||
SYS: Initializer Database: search-index.db | ||
SYS: Initializer Censorship Database: censorship.db | ||
SYS: Create Users Account Database: users-account.db | ||
SYS: Initializer Virtual Table: search-index.db | ||
SYS: Loaded: search-index.db | ||
SYS: Update Virtual Table: search-index.db | ||
SYS: Start Server: 2024-02-12 07:20:55 | ||
SYS: Loaded: search-index.db | ||
SYS: Loaded: users-account.db | ||
SYS: Loaded: search-index.db | ||
SYS: Loaded: search-index.db | ||
SYS: Loaded: search-index.db | ||
SYS: Update Virtual Table: search-index.db | ||
SYS: Loaded: search-index.db | ||
SYS: Loaded: search-index.db | ||
SYS: Loaded: search-index.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
def escape_special_characters(text): | ||
special_characters_dict = { | ||
'+': '"plus"', | ||
'-': '"minus"', | ||
'*': '"asterisk"', | ||
':': '"colon"', | ||
'(': '"leftparen"', | ||
')': '"rightparen"', | ||
'[': '"leftbracket"', | ||
']': '"rightbracket"', | ||
'{': '"leftbrace"', | ||
'}': '"rightbrace"', | ||
'~': '"tilde"', | ||
'?': '"questionmark"', | ||
'\\': '"backslash"' | ||
} | ||
|
||
for char, replacement in special_characters_dict.items(): | ||
text = text.replace(char, replacement) | ||
|
||
return text | ||
|
||
def return_special_characters(text): | ||
special_characters_dict = { | ||
'"plus"': '+', | ||
'"minus"': '-', | ||
'"asterisk"': '*', | ||
'"colon"': ':', | ||
'"leftparen"': '(', | ||
'"rightparen"': ')', | ||
'"leftbracket"': '[', | ||
'"rightbracket"': ']', | ||
'"leftbrace"': '{', | ||
'"rightbrace"': '}', | ||
'"tilde"': '~', | ||
'"questionmark"': '?', | ||
'"backslash"': '\\' | ||
} | ||
|
||
for char, replacement in special_characters_dict.items(): | ||
text = text.replace(char, replacement) | ||
|
||
return text |