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

Style tag get stripped from riot tag even if it's in a javascript string #2210

josephrocca opened this issue Jan 11, 2017 · 3 comments


Copy link

@josephrocca josephrocca commented Jan 11, 2017

  1. Describe your issue:


  let myStyle = "<style> body { margin:0; padding:0; color: green; font-family:monospace; } </style>";

compiles to this:

  let myStyle = "";

(in terms of the script part of the tag only)

Very surprising behaviour! I hope the new parser fixes this. Either there's some very naive regex happening in riot at the moment, or I've really messed up somewhere.

Current workaround is this sort of thing:

let myStyle = "<"+"style"+">"+"body { margin:0; padding:0; color: green; font-family:monospace; }"+"<"+"/style"+">"; // (lol)
  1. Can you reproduce the issue?

  1. On which browser/OS does the issue appear?
    Chrome, Ubuntu, at least

  2. Which version of Riot does it affect?
    Riot 3.0.5 at least

  3. How would you tag this issue?

  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
@GianlucaGuarini GianlucaGuarini added invalid bug and removed invalid labels Jan 12, 2017
aMarCruz referenced this issue in riot/compiler Jan 22, 2017
Copy link

@aMarCruz aMarCruz commented Jan 22, 2017

@GianlucaGuarini , fix is in the dev brach of riot-compiler

Copy link

@GianlucaGuarini GianlucaGuarini commented Jan 22, 2017

thanks @aMarCruz could you please publish a new release?

Copy link

@aMarCruz aMarCruz commented Jan 22, 2017

@GianlucaGuarini riot-compiler v3.1.2 is up.
Closing this issue.

@aMarCruz aMarCruz closed this Jan 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.