Improve BeQtCodeEditor text preprocessing