The 2nd problem is the biggest I suppose. Present day development deals with chunks of code in different languages, all put in the same file. It just kills me to code Python+JS+HTML in a single file, pathetic support.
The 2nd problem is the biggest I suppose. Present day development deals with chunks of code in different languages, all put in the same file. It just kills me to code Python+JS+HTML in a single file, pathetic support.
That said, I never run into this when working with Clojure, since both the major templating solutions (Hiccup and Enlive) use only one language per file (Clojure and HTML, respectively) and I can keep my JS cleanly separate, barring the occasional Google Analytics snippet.
That got me worried - you probably don't need to suffer this. What are you using this multilanguage file for? You shouldn't put lots of JS inside HTML and certainly not embed Python code inside it (nor the reverse).
Either way, the code looks/reads a lot cleaner if you include the JavaScript as a separate file referenced from your HTML. Solves 2 problems.