Allow the same shortcode to be used with or without inline content

Fixes #934
This commit is contained in:
bep 2015-03-02 21:23:16 +01:00
parent 241f9f9e46
commit ab5862cd00
4 changed files with 19 additions and 3 deletions

View file

@ -65,6 +65,9 @@ var shortCodeLexerTests = []shortCodeLexerTest{
{"two params", `{{< sc1 param1 param2 >}}`, []item{
tstLeftNoMD, tstSC1, tstParam1, tstParam2, tstRightNoMD, tstEOF}},
// issue #934
{"self-closing", `{{< sc1 />}}`, []item{
tstLeftNoMD, tstSC1, tstSCClose, tstRightNoMD, tstEOF}},
{"nested simple", `{{< sc1 >}}{{< sc2 >}}{{< /sc1 >}}`, []item{
tstLeftNoMD, tstSC1, tstRightNoMD,
tstLeftNoMD, tstSC2, tstRightNoMD,