support trimming on multilines