storybookjs / marksy

📑 A markdown to custom VDOM components library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue when using braces inside custom component

kirill-kruchkov opened this issue · comments

When using braces inside custom component the component's node doesn't render at all to the top custom component inclusive.

screen shot 2017-06-09 at 18 56 33
screen shot 2017-06-09 at 18 56 38

Hi there!

This is interesting. The demo runs with marksy/components. meaning that all HTML is transpiled by babel. the { in components world is actually syntax, causing it to be invalid when there is only one. Example:

function ({bar}) {
  return <div>foo {bar}</div>
}

You have to think of it as React code :-)

So your example should work if you:

<Row>
  <Col>{`Need to tell you something over here
.my-class {
`}</Col>
</Row>

@christianalfoni, got it. Thank you!