Use the optional newline workaround for more keywords

Fixes issue #279.
Uses the same approach for the fix which was discussed in #244 and implemented for the param block in #321.