Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leading and trailing whitespaces get stripped in text grammar #78

Closed
MarcCote opened this issue Nov 1, 2018 · 1 comment
Closed

Leading and trailing whitespaces get stripped in text grammar #78

MarcCote opened this issue Nov 1, 2018 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@MarcCote
Copy link
Contributor

MarcCote commented Nov 1, 2018

At the moment, when parsing the grammar files, whitespaces found at the start or the end of expansions are getting stripped. This might also been the case with the old way of loading grammar files.

To reproduce the issue:
tw-make custom --quest-breadth 3 --quest-length 3 --seed 24853 --output tw_games/test.ulx
tw-play ./tw_games/test.ulx

Welcome to TextWorld! Here is your task for today. First, it would be good if
you could make an effort to head east.After that,recover the key from the
kitchen. And if you do that, you're the winner!

Note the whitespaces in house_instructions.twg

...
emptyinstruction1: And then, ;
emptyinstruction2: Then, ;
emptyinstruction3: After that, ;
emptyinstruction4: And then, ;
emptyinstruction5: After that, ;
emptyinstruction6: Then, ;
emptyinstruction7: And then, ;
emptyinstruction8: After that, ;
emptyinstruction9: And then, ;
emptyinstruction10: Then, ;
@MarcCote MarcCote added the bug Something isn't working label Nov 1, 2018
@MarcCote
Copy link
Contributor Author

MarcCote commented Feb 7, 2019

This seems fixed now.

@MarcCote MarcCote closed this as completed Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants