Fix unparseable documentation strings

Fixes #1902.