[overlay mode demo] Fixed bug which highlighted the rest of the line

If "{{" was found, the code would highlight the rest of the line
regardless if a matching "}}" or "}}}" was found.