Shouldn't Javascript highlighting support template literals by now? The whole thing looks like a big giant string from ` to `, or worse, consider everything as code. No respect for ${}
at all.
Just look at this:
var str = `
Hello ${obj.firstName + " " + obj.lastName}!
<div class="${obj.adult? "adult": ""} human">
<div>Age: ${obj.age}</div>
<div>Occupation: ${obj.occ}</div>
<div class="pictures">
${
obj.pictures.map(function(pic) {
return `<img class="picture" src="${pic.src}" alt="${pic.alt}">`;
}).join("");
}
</div>
</div>
`;
It's really hard to spot code inside the template literal, and this is a well indented example. There are far worse, believe me.