prokls / turingmachine.js

A turingmachine for educational purposes (HTML5-webapp)
4 stars 1 forks source link

Make state names as whitespace-insensitive as possible #9

Closed prokls closed 9 years ago

prokls commented 10 years ago

It seems like users assume that whitespace does not matter. So " x" equals "x". This is currently not true. A proposal would be to normalize several whitespaces to one space. One whitespace is normalize to one space. No whitespace stays the empty string "".

prokls commented 9 years ago

The trim method of normalizeState in the current release takes care of this usecase. More features are not yet possible until state_norm_fn is better supported.