ractivejs / ractive-load

Import templates and components using AJAX
ractivejs.github.io/ractive-load
MIT License
55 stars 10 forks source link

Html comments stripped #38

Open jeroenlammerts opened 8 years ago

jeroenlammerts commented 8 years ago

Why are comments stripped out of the component?

<p>Hello {{subject}} <!-- keep me here --></p>

<script>
  component.exports = {
    data: { subject: 'World' },
    stripComments: false
  };
</script>

output:

<p>Hello World</p>
MartinKolarik commented 8 years ago

I think we might have an open issue for this somewhere. The problem is that the code in rcu has some parsing options hardcoded.

MartinKolarik commented 8 years ago

I think this is the relevant bit of code. A PR to make those user-configurable would be definitely welcomed.