akdubya / dustjs

Asynchronous templates for the browser and node.js
http://akdubya.github.com/dustjs/
MIT License
1.44k stars 124 forks source link

javascript single line comments cause parse error #49

Open troyk opened 12 years ago

troyk commented 12 years ago

Parser pukes on this:

  <script language="javascript">
    $(function(){
      $('#krutmnu a').click(function(e){
        //$('#body').children().hide().filter('#'+$(this).attr('href').replace(/#/,'')+'_panel').toggle(true);
      });
    });
  </script>

But not this:

  <script language="javascript">
    $(function(){
      $('#krutmnu a').click(function(e){
        /* $('#body').children().hide().filter('#'+$(this).attr('href').replace(/#/,'')+'_panel').toggle(true); */
      });
    });
  </script>

It looks like development here has stalled, but of course the great thing with open source is I can fix this myself but I think I'll wait and see if this is covered in the linkedin fork which is supposed to show up soon http://engineering.linkedin.com/frontend/client-side-templating-throwdown-mustache-handlebars-dustjs-and-more

vybs commented 12 years ago

We avoid using inline scripts in the templates for a lot of good reasons. But certainly a good fix to have.

BTW, we now host our fork on the repo.

https://github.com/linkedin/dustjs