No empty string words / allow 1 character search
If a space character is at either end of the input string splitting it procuces an empty string that matches everything. Allow single character words as there are is a single character tag: `x`
This commit is contained in:
@@ -25,7 +25,8 @@
|
||||
}
|
||||
|
||||
function getMatchingExamples(text) {
|
||||
if (text.length < 2) {
|
||||
text = text.trim();
|
||||
if (text.length === 0) {
|
||||
return info.examples;
|
||||
}
|
||||
const words = text.split(/\W+/);
|
||||
|
||||
Reference in New Issue
Block a user