Comments (4)
Aah, that explains it! I previously used nightly, but migrated to stable recently. The tests pass on nightly (except for one test that does assertions with regards to error message output.)
One approach would be to add a
nightly
feature flag tohtml-macro
that controls whether or not unquoted text is supported. So that people can't accidentally use unquoted text on stable.
That would be nice. Or a unquoted-text
feature that throws a compile-time error if used on a non-nightly Rust version.
from percy.
cargo -V
?
I'm trying to see if you're on stable or nightly.
Right now text works slightly differently on stable vs. nightly.
One approach would be to add a nightly
feature flag to html-macro
that controls whether or not unquoted text is supported. So that people can't accidentally use unquoted text on stable.
from percy.
The quoting workaround is a bit awkward due to double curly braces when using top-level text:
html! { { "Hello World" } },
However, I guess we'll have to live with this limitation for now.
from percy.
There shouldn't be a fundamental reason that we couldn't support html!{ "Hello World" }
, would probably just require some tweaks to the parsing logic.
I'm also realizing that we shouldn't need a feature flag.
If you aren't on nightly then Span.line()
and Span.column()
always return 0, so whenever we encounter unquoted text we can just check the line/column
and if they are both zero we create a compile time error that unquoted text only works on nightly.
from percy.
Related Issues (20)
- Use request_animation_frame from rust instead of Global Js call for update view HOT 3
- Free hosting? HOT 5
- Sub-routes not working? HOT 1
- Bash files in examples to rust-script? HOT 5
- Curly braces for value interpolation HOT 1
- Implement Performance Metrics HOT 2
- Implement a Formatting Tool HOT 2
- Consider Pure JS Transpilation HOT 2
- FYI: branding/naming clash HOT 1
- Crate renames HOT 1
- Docs: Broken CSS HOT 1
- Building nojs-first applications (and some thoughts about an isomorphic data layer) HOT 1
- Free Hosting for Demos HOT 1
- Allow Support for multiple parameters in `JSX` syntax HOT 4
- Spaces removed when isomorphic app is hydrated HOT 3
- File referred to in documentation doesn't exist
- Fix parenthesized blocks in html macro
- Panic happened in /allocator/free_list.rs that `new_page == 0` HOT 1
- Is this thing dead? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from percy.