Added support for multiline trimming