Skip to content

Handle inline <style>s #35

@karlfloersch

Description

@karlfloersch

I've been playing around with react-magic, testing it on a number of different websites. I got one syntax error quite often. I've included a few examples of this error.

How to reproduce For each site I opened up the debug console (in Firefox), and ran this command (taken from the bookmarklet):

    (function(b){function c(){if(0!==d.length){var e=d.shift(),a=b.createElement("script");a.src=e;a.onload=c;b.body.appendChild(a)}}var d=["http://fb.me/react-0.13.3.min.js","http://fb.me/JSXTransformer-0.13.3.js","http://reactjs.github.io/react-magic/magic.min.js"];c();return!1})(document);
URL React-Magic Error
http://www.uschs.org/ Error: Something bad happened when transforming HTML to JSX: Error: Parse Error: Line 268: Unexpected token :
http://www.starwars.com/news Error: Something bad happened when transforming HTML to JSX: Error: Parse Error: Line 5: Unexpected token :
http://karl.tech/ Error: Something bad happened when transforming HTML to JSX: Error: Parse Error: Line 12: Unexpected token :

Maybe it has to do with inline styles?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions