parser/pageparser: Add a testcase for nested shortcodes of the same name

See #14054
This commit is contained in:
Bjørn Erik Pedersen
2025-10-16 16:47:15 +02:00
parent 1e91e46520
commit 989454a52d
@@ -142,6 +142,12 @@ var shortCodeLexerTests = []lexerTest{
tstLeftNoMD, tstSC2, tstRightNoMD,
tstLeftNoMD, tstSCClose, tstSC1, tstRightNoMD, tstEOF,
}, nil},
{"nested same", `{{< sc1 >}}{{< sc1 >}}{{< /sc1 >}}{{< /sc1 >}}`, []typeText{
tstLeftNoMD, tstSC1, tstRightNoMD,
tstLeftNoMD, tstSC1, tstRightNoMD,
tstLeftNoMD, tstSCClose, tstSC1, tstRightNoMD,
tstLeftNoMD, tstSCClose, tstSC1, tstRightNoMD, tstEOF,
}, nil},
{"nested complex", `{{< sc1 >}}ab{{% sc2 param1 %}}cd{{< sc3 >}}ef{{< /sc3 >}}gh{{% /sc2 %}}ij{{< /sc1 >}}kl`, []typeText{
tstLeftNoMD, tstSC1, tstRightNoMD,
nti(tText, "ab"),