Skip to content

Commit 989454a

Browse files
committed
parser/pageparser: Add a testcase for nested shortcodes of the same name
See #14054
1 parent 1e91e46 commit 989454a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎parser/pageparser/pageparser_shortcode_test.go‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ var shortCodeLexerTests = []lexerTest{
142142
tstLeftNoMD, tstSC2, tstRightNoMD,
143143
tstLeftNoMD, tstSCClose, tstSC1, tstRightNoMD, tstEOF,
144144
}, nil},
145+
{"nested same", `{{< sc1 >}}{{< sc1 >}}{{< /sc1 >}}{{< /sc1 >}}`, []typeText{
146+
tstLeftNoMD, tstSC1, tstRightNoMD,
147+
tstLeftNoMD, tstSC1, tstRightNoMD,
148+
tstLeftNoMD, tstSCClose, tstSC1, tstRightNoMD,
149+
tstLeftNoMD, tstSCClose, tstSC1, tstRightNoMD, tstEOF,
150+
}, nil},
145151
{"nested complex", `{{< sc1 >}}ab{{% sc2 param1 %}}cd{{< sc3 >}}ef{{< /sc3 >}}gh{{% /sc2 %}}ij{{< /sc1 >}}kl`, []typeText{
146152
tstLeftNoMD, tstSC1, tstRightNoMD,
147153
nti(tText, "ab"),

0 commit comments

Comments
 (0)