aichaos / rivescript-java

A RiveScript interpreter for Java. RiveScript is a scripting language for chatterbots.
http://www.rivescript.com
MIT License
64 stars 38 forks source link

Fixed data loss occuring when variable contains = #55

Closed pmioulet closed 6 years ago

pmioulet commented 6 years ago

Split done on the var/set tags using the = char was causing data loss if assigned value contains an equal

marceloverdijk commented 6 years ago

Thx @pmioulet! I will run it against RiveScript test suite and will try to make a bugfix release asap.

marceloverdijk commented 6 years ago

Hmm, com.rivescript.ObjectIT is failing now. I will need to look into this further.

pmioulet commented 6 years ago

You can fix it with this change in com.rivescript.ObjectIT:

Error is due to the trim not being called on the object macro for the python support.

I had not planned on having this commit in the PR, it's my 1st PR on github so i might have missed something :(

marceloverdijk commented 6 years ago

I reversed the trim commit for now. If you have text object macro like:

> object hello text
    Hello world!
< object

then the line should not be trimmed. Maybe good to focus on this in the Python PR. Just make sure to create a new branch for the Python support.