Do not close string and character literals before text

Fixes #1001652
Merge pull request #420 from sschaef/t1001652-not-close-literals-before-text

Do not close string and character literals before text