Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unquoted Text #2

Open
stoically opened this issue Sep 6, 2020 · 5 comments
Open

Unquoted Text #2

stoically opened this issue Sep 6, 2020 · 5 comments
Labels
enhancement New feature or request nightly

Comments

@stoically
Copy link
Owner

stoically commented Sep 6, 2020

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
@stoically stoically added enhancement New feature or request nightly labels Sep 6, 2020
@Snarik
Copy link

Snarik commented Nov 12, 2022

Has anyone tried to fork and build manually with nightly to achieve this?

@stoically
Copy link
Owner Author

stoically commented Nov 13, 2022

@Snarik I'm currently working on adding the feature behind a feature flag, so that it can be used with nightly rust already, because I'll probably need span start/end to properly implement #43 as well.

@Snarik
Copy link

Snarik commented Nov 13, 2022

That's amazing news! Anything I can do to help?

@vldm
Copy link

vldm commented Apr 14, 2023

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>

@pyrossh
Copy link

pyrossh commented Jun 20, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request nightly
Projects
None yet
Development

No branches or pull requests

4 participants