In sh-script, we use syntax-propertize to make sure the whole string and
its contents is all considered as a string and nothing else.  This was
the simplest solution and probably corresponds to the current behavior
of js.el (and typescript.el) as well.

I'd also like to add that I've been told syntax-propertize is a property of font-lock and relying on it for correct operation on syntax-tables is ... not entirely guaranteed.

Basically, if a user disables font-lock for whatever reason (maybe scripted automation?), you can no longer rely on the syntax-properties to be correct.

It might be a bigger problem in theory than in practice, but again it represents yet another inaccuracy in the syntax-model and analysis of it.

It would be nice to get this stuff cleaned up.

--
Jostein Kjønigsen