add trim function to support doc indent