Closed snoopyjc closed 4 years ago
Potential fix in parser.py:
# Handle the types of RiveScript commands.
if cmd == '!':
# ! DEFINE
- halves = re.split(RE.equals, line, 2)
+ halves = re.split(RE.equals, line, 1)
Potential fix for js version:
// Handle the types of RiveScript commands.
switch (cmd) {
case "!": // ! Define
- let halves = line.split("=", 2);
+ let halves = line.split("=", 1);
Fixed in #144.
If a var definition RHS contains a ‘=‘, that will act as the end of the definition. Instead it should be part of the variable value. Example:
User: Where is your site?
Bot: https://www.rivescript.com/try/#/doc?x