Skip to content

Commit

Permalink
minor fixes (#236)
Browse files Browse the repository at this point in the history
* minor fixes

* fixed backticks/quotes

* Update searching.md
  • Loading branch information
brishtibheja authored Sep 7, 2024
1 parent 50757bd commit 19cef1b
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/searching.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,25 @@ Things to note from the above:
- Search terms are separated by spaces.

- When multiple search terms are provided, Anki looks for notes that
match all of the terms - an implicit "and" is inserted between each
match all of the terms - an implicit `and` is inserted between each
term. On Anki 2.1.24+, AnkiMobile 2.0.60+, and AnkiDroid 2.17+ you can be explicit
if you like ("dog and cat" is the same as "dog cat"), but older
Anki versions will treat "and" as just another word to search for.
if you like (`dog and cat` is the same as `dog cat`), but older
Anki versions will treat `and` as just another word to search for.

- You can use "or" if you only need one of the terms to match.
- You can use `or` if you only need one of the terms to match.

- You can prepend a minus sign to a term to find notes that don’t
- You can prepend a minus sign (`-`) to a term to find notes that don’t
match the term.

- You can group search terms by placing them in parentheses, as in the
"dog (cat or mouse)" example. This becomes important when
`dog (cat or mouse)` example. This becomes important when
combining OR and AND searches — in the example, with the
parentheses, it matches either "dog cat" or "dog mouse", whereas
without them it would match either "dog and cat" or "mouse".

- Anki is only able to search within formatting in the [sort field](editing.md#customizing-fields) you’ve configured. For example, if you add
"**exa**mple" to one of your fields, with the "exa" part in bold, this will not be matched when
searching for "example" unless that field is the sort field. If a
searching for `example` unless that field is the sort field. If a
word is not formatted, or the formatting does not change in the
middle of the word, then Anki will be able to find it in any field.

Expand Down Expand Up @@ -217,7 +217,7 @@ Some things to be aware of:
- The search is case-insensitive by default; use `(?-i)` at the start to turn on case sensitivity.
- Some text like spaces and newlines may be represented differently in HTML - you can
use the HTML editor in the editing screen to see the underlying HTML contents.
- For the specifics of Anki's regex support, see the [regex crate documentation](<https://docs.rs/regex/1.3.9/regex/#syntax>)
- For the specifics of Anki's regex support, see the [regex crate documentation](<https://docs.rs/regex/1.3.9/regex/#syntax>).

## Card state

Expand Down Expand Up @@ -290,7 +290,7 @@ cards due yesterday that haven’t been answered yet.
all cards due in the future, including tomorrow.

`prop:due<=-1`\
all overdue cards
all overdue cards.

`prop:due>-1 prop:due<1`\
cards due yesterday, today and tomorrow.
Expand Down Expand Up @@ -382,7 +382,7 @@ you need to tell Anki not to treat them specially. This is called "escaping a ch
`part:"after the colon"`.

- `And`/`Or`\
To search for the words `or` and `and`, wrap them with double quotes. For example, `dog "and" cat` searches for "dog", "cat" and the word "and".
To search for these words, wrap them with double quotes. For example, `dog "and" cat` searches for "dog", "cat" and the word "and".
If you wrap the entire search term with quotes like in the previous example, you do not need to escape `and` or `or`.

- `"`, `*` and `_`\
Expand All @@ -408,7 +408,7 @@ you need to tell Anki not to treat them specially. This is called "escaping a ch
- `:`\
Colons have to be escaped using backslashes unless they are preceded by another, unescaped colon.
For example, `w:3:30` searches for "3:30" on word boundary and doesn't require you to use a backslash.
However, if you don't use a colon search, the colons need to escaped like this: `3\:30`.
However, if you don't use a colon search, the colons need to be escaped like this: `3\:30`.

- `&`, `<`, and `>`\
`&`, `<`, and `>` are treated as HTML when searching in Anki, and as such, searches
Expand All @@ -422,7 +422,7 @@ Text preceded by certain keywords (like `re:`) will be treated as raw input. Tha
the characters listed above largely lose their special meaning. In such a context, only
a minimum of escaping is required to prevent ambiguity:

- `"` must be escaped.
- Double quotes (`"`) must be escaped.

- Spaces and unescaped parentheses require the search term to be quoted.

Expand All @@ -431,10 +431,10 @@ a minimum of escaping is required to prevent ambiguity:
## Object IDs

`nid:123`\
the note with note id 123
the note with note id 123.

`cid:123,456,789`\
all cards with card ids 123, 456 or 789
all cards with card ids 123, 456, or 789.

Note and card IDs can be found in the [card info](stats.md) dialog in the
browser. These searches may also be helpful when doing add-on
Expand Down

0 comments on commit 19cef1b

Please sign in to comment.