UNPKG

markdown-it-ember

Version:
305 lines (254 loc) 4.57 kB
[Inline, SL, AB] . <MyComponent/> . <MyComponent/> . [Inline, SL, AB] with whitespace . <MyComponent /> . <MyComponent /> . [Inline, SL, AB] with whitespace and sub component . <My::Component /> . <My::Component /> . [Inline, ML, AB] with args on multiple lines . <MyComponent @foo="yes" @bar="no" /> after . <MyComponent @foo="yes" @bar="no" /> <p>after</p> . [Inline, ML, AB] with args on multiple lines (last line) . <MyComponent @foo="yes" @bar="no" /> . <MyComponent @foo="yes" @bar="no" /> . [Inline, ML, AB] with args on multiple lines and sub component . <My::Component @foo="yes" @bar="no" /> after . <My::Component @foo="yes" @bar="no" /> <p>after</p> . [Block, SL, AB] . <MyComponent></MyComponent> after . <MyComponent></MyComponent> <p>after</p> . [Block, SL, AB] with arguments . <MyComponent @param={{foo}}></MyComponent> after . <MyComponent @param={{foo}}></MyComponent> <p>after</p> . [Block, ML, AB] with arguments and block content . <MyComponent @param={{foo}}> hello world </MyComponent> after . <MyComponent @param={{foo}}> hello world </MyComponent> <p>after</p> . [Block, ML, AB] with arguments, block content and yield . <MyComponent @param={{foo}} as |my|> <my.Foo>Hello</my.Foo> <my.Bar>World</my.Bar> </MyComponent> after . <MyComponent @param={{foo}} as |my|> <my.Foo>Hello</my.Foo> <my.Bar>World</my.Bar> </MyComponent> <p>after</p> . [Block, ML, AB] with arguments, block content and yield and sub component . <My::Component @param={{foo}} as |my|> <my.Foo>Hello</my.Foo> <my.Bar>World</my.Bar> </My::Component> after . <My::Component @param={{foo}} as |my|> <my.Foo>Hello</my.Foo> <my.Bar>World</my.Bar> </My::Component> <p>after</p> . [Mixed, ML, AB] with everything . <My::Component @param={{foo}} as |my|> <my.Foo as |f|> <f.Bar /> </my.Foo> <my.Bar>World</my.Bar> </My::Component> after . <My::Component @param={{foo}} as |my|> <my.Foo as |f|> <f.Bar /> </my.Foo> <my.Bar>World</my.Bar> </My::Component> <p>after</p> . [Block, ML, AB] Nested components . <Demo @source="card.hbs"> <Card> Simplest Card </Card> </Demo> after . <Demo @source="card.hbs"> <Card> Simplest Card </Card> </Demo> <p>after</p> . [Block, SL, CB] . {{#my-component}}{{/my-component}} after . {{#my-component}}{{/my-component}} <p>after</p> . [Code Block, AB] Fenced block . ``` <MyComponent/> ``` after . <pre><code>&lt;MyComponent/&gt; </code></pre> <p>after</p> . [Code Block, AB] Fenced block with values and modifiers . ``` <TextInput disabled={{true}} {{on "click" this.handleClick}}/> ``` after . <pre><code>&lt;TextInput disabled=&#123;&#123;true&#125;&#125; &#123;&#123;on &quot;click&quot; this.handleClick&#125;&#125;/&gt; </code></pre> <p>after</p> . [Code Block, AB] Fenced block with language . ```hbs <MyComponent/> ``` after . <pre><code class="language-hbs">&lt;MyComponent/&gt; </code></pre> <p>after</p> . [Code Block, AB] Fenced block with values and modifiers and language . ```hbs <TextInput disabled={{true}} {{on "click" this.handleClick}}/> ``` after . <pre><code class="language-hbs">&lt;TextInput disabled=&#123;&#123;true&#125;&#125; &#123;&#123;on &quot;click&quot; this.handleClick&#125;&#125;/&gt; </code></pre> <p>after</p> . [Backticks, AB] Inline Fenced . text with a `<MyComponent/>` inside . <p>text with a <code>&lt;MyComponent/&gt;</code> inside</p> . [Backticks, AB] Inline Fenced with sub-component . text with a `<My::Component/>` inside . <p>text with a <code>&lt;My::Component/&gt;</code> inside</p> . [Code Block, CB] Fenced block . ``` {{MyComponent}} ``` after . <pre><code>&#123;&#123;MyComponent&#125;&#125; </code></pre> <p>after</p> . [Code Block, CB] Fenced block with language . ```hbs {{MyComponent}} ``` after . <pre><code class="language-hbs">&#123;&#123;MyComponent&#125;&#125; </code></pre> <p>after</p> . [Backticks, CB] Inline Fenced . text with a `{{MyComponent}}` inside . <p>text with a <code>&#123;&#123;MyComponent&#125;&#125;</code> inside</p> . [Backticks, CB] Inline Fenced with sub-component . text with a `{{My::Component}}` inside . <p>text with a <code>&#123;&#123;My::Component&#125;&#125;</code> inside</p> . [Paragraph, Block, ML, AB] with args on multiple lines . Lorem Ipsum <LinkTo @route="foo">bla </LinkTo> dolor sit amet after . <p>Lorem Ipsum <LinkTo @route="foo">bla </LinkTo> dolor sit amet</p> <p>after</p> . [Paragraph, Inline, SL, AB] with args on multiple lines . Lorem Ipsum <Foo/> dolor sit amet after . <p>Lorem Ipsum <Foo/> dolor sit amet</p> <p>after</p> .