Prevent conflicts with built-in quote substution

Extend matching criteria to both whitespaces and punctuations (which
matches criteria of built-in substution), and prevent built-in
substitution from happening while mimicking the same behaviour.

Fix #152.