Snippets in Kate are very useful, but a new snippet can cause a crash if you don’t pay attention to some symbols, such as “=”, or ” ” “. You have to “escape” this kind of symbols in the code of a snippet. To escape something, remind, you have to use “\“. I.g. to escape ", write \".
I.g. this code is not correct
${rangeCommand("<span lang='grc'>%%1</span>", "greco")}
While this one is correct
${rangeCommand("<span lang\='grc'>%%1</span>", "greco")}