diff --git a/examples/index.js b/examples/index.js index 665d41731a..7c50304a5c 100644 --- a/examples/index.js +++ b/examples/index.js @@ -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+/);