storybookjs / marksy

📑 A markdown to custom VDOM components library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

custom components and indentation

revolunet opened this issue · comments

Hi, playing with marksy to mix markdown + react components

Looks like components are not renderer if they are indented

this works

const md = `
  # hello

  <MyCustomComponent>blablala</MyCustomComponent>
`;

this don't :

const md = `
  # hello

    <MyCustomComponent>blablala</MyCustomComponent>
`;

MyCustomComponent has 2 more leading spaces :)

@revolunet Aha, interesting! This is highly likely to markdown parsing. If you rather do:

const md = `
  # hello

  \`\`\`marksy
    <MyCustomComponent>blablala</MyCustomComponent>
  \`\`\`
`;

You should be able to do whatever :) ... without the \, just github parsing it wrong

Just closing this as there is no response