Strip ANSI codes from parser errors in IDE

Fixes #1458.
Merge pull request #1459 from david-christiansen/issue/1458

Strip ANSI codes from parser errors in IDE