Add isIdentCharacter function to ensure that unexpected characters are handled correctly
This commit is contained in:
@@ -17,9 +17,10 @@ const QUERY = [
|
||||
":a",
|
||||
"a b:",
|
||||
"a (b:",
|
||||
"{:",
|
||||
"_:",
|
||||
"a-bb",
|
||||
"a>bb",
|
||||
"ab'",
|
||||
];
|
||||
|
||||
const PARSED = [
|
||||
@@ -188,11 +189,11 @@ const PARSED = [
|
||||
{
|
||||
elems: [],
|
||||
foundElems: 0,
|
||||
original: "{:",
|
||||
original: "_:",
|
||||
returned: [],
|
||||
typeFilter: -1,
|
||||
userQuery: "{:",
|
||||
error: "Unknown type filter `{`",
|
||||
userQuery: "_:",
|
||||
error: "Unknown type filter `_`",
|
||||
},
|
||||
{
|
||||
elems: [],
|
||||
@@ -212,4 +213,13 @@ const PARSED = [
|
||||
userQuery: "a>bb",
|
||||
error: "Unexpected `>` (did you mean `->`?)",
|
||||
},
|
||||
{
|
||||
elems: [],
|
||||
foundElems: 0,
|
||||
original: "ab'",
|
||||
returned: [],
|
||||
typeFilter: -1,
|
||||
userQuery: "ab'",
|
||||
error: "Unexpected `'`",
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user