You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is done to prevent eating something that can be treated as Node variant.
But introducing custom nodes in #34 allows library users to extend Node variant.
For example, one can try to add support of control-flow through "escaping sequence":
<div>
@ if x % 2 = 0 {even} else {odd}</div>
Currently example above should work fine, but if we will try to mix it with RawText it will fail
Example that will not work:
<div>
x is
@ if x % 2 = 0 {even} else {odd}</div>
The text was updated successfully, but these errors were encountered:
Currently
RawText
parser is eating all tokens except one from whitelist (https://github.com/rs-tml/rstml/blob/main/src/node/raw_text.rs#L121):<
- tag start"
- quoted text{
- rust expression startedThis is done to prevent eating something that can be treated as
Node
variant.But introducing custom nodes in #34 allows library users to extend
Node
variant.For example, one can try to add support of control-flow through "escaping sequence":
Currently example above should work fine, but if we will try to mix it with
RawText
it will failExample that will not work:
The text was updated successfully, but these errors were encountered: