Skip to content

xml-indent: Optimize getCode

Waqar Ahmed requested to merge work/xml-fast into master

It calls code.trim() at the end which can be a massive slowdown if the text has spaces at the end/beginning. We can avoid this by starting at first non space column.

Note for future, perhaps this function can be factored out to a common place as its being used by many indenters

Merge request reports

Loading