Speedup the capturing outside of the <pre> element