[graphspell][js] trim useless spaces