add allowTrim support for highlighter