You are here: PSPad forum > Bug report / Hlášení chyb > HTML multihighlighter nested quotes error
Posted by: RickH | Date: 2015-07-03 13:35 | IP: IP Logged
I've discovered that in certain situations, a single quote (') acts like a comment. For instance (from an underscore/Backbone template) in
<input value="<%= model.get('value') %>" />
the first single quote highlights everything as a comment until the closing "%>". Swapping the single and double quotes corrects the problem:
<input value='<%= model.get("value") %>' />
This is only a minor annoyance, but you get to something like a split "if" block:
<% if (classModel.get('classFull') === false) { %>
the opening curly bracket is "commented" out, making finding the closing curly bracket by highlighting impossible.
There's an easy workaround (don't nest a single quote inside a double quote), but I thought you might want to be aware of it.
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR