superscriptjs / superscript

A dialogue engine for creating chat bots
http://superscriptjs.com
MIT License
1.65k stars 209 forks source link

Wildcards also get optionals after them. Ex: "*~2 [to]" #367

Open antonispoulakis opened 7 years ago

antonispoulakis commented 7 years ago

When using wildcards in input and an optional after them, and the input is less than the maximum length of the wildcard, it also gets the optional. Example:

+ *~3 [optional]
- <cap>

When run:

User: hello there optional
Bot: hello there optional

instead of:

User: hello there optional
Bot: hello there