Unquoted Text
stoically opened this issue · comments
stoically commented
Support for <div>Some Text</div>
via proc_macro2
's span-locations
feature by manually calculating the whitespaces based on Span start
and end
Depends on rust-lang/rust#54725
Caveat
- Whitespaces after text and before newline can't be determined correctly, so text that relies on 100% accurate whitespacing (like in
<pre>
) will not render correctly
Kiran Singh commented
Has anyone tried to fork and build manually with nightly to achieve this?
stoically commented
Kiran Singh commented
That's amazing news! Anything I can do to help?
Vladimir Motylenko commented
Hi, i am interesting if it could help parsing inline style/script?
<style>
div {
background-color: red;
color: white;
}
</style>
<script>
var x = 12;
console.log(x);
if (x>1) {
// if so, how it treat comments, and templating.
// what about templating with embeded html?
var y = ` <div>#{x}<div>`
console.log(y);
}
</script>
Peter John commented
@vldm please use this instead,
https://github.com/rs-tml/rstml
Edit: My bad. @vldm is the creator of rstml
. Nice. Maybe this issue can be closed now.