|
27 | 27 | tstRightMD = nti(tRightDelimScWithMarkup, "%}}") |
28 | 28 | tstSCClose = nti(tScClose, "/") |
29 | 29 | tstSC1 = nti(tScName, "sc1") |
| 30 | + tstSCAnother = nti(tScName, "another") |
30 | 31 | tstSC1Inline = nti(tScNameInline, "sc1.inline") |
31 | 32 | tstSC2Inline = nti(tScNameInline, "sc2.inline") |
32 | 33 | tstSC2 = nti(tScName, "sc2") |
@@ -74,6 +75,10 @@ var shortCodeLexerTests = []lexerTest{ |
74 | 75 | tstLeftNoMD, tstSC1, tstRightNoMD, tstLeftNoMD, tstSCClose, |
75 | 76 | nti(tError, "closing tag for shortcode 'another' does not match start tag"), |
76 | 77 | }, nil}, |
| 78 | + {"close wrong, repeated", `{{< sc1 >}}{{< another >}}{{< /another >}}{{< /another >}}`, []typeText{ |
| 79 | + tstLeftNoMD, tstSC1, tstRightNoMD, tstLeftNoMD, tstSCAnother, tstRightNoMD, tstLeftNoMD, tstSCClose, tstSCAnother, tstRightNoMD, tstLeftNoMD, tstSCClose, |
| 80 | + nti(tError, "closing tag for shortcode 'another' does not match start tag"), |
| 81 | + }, nil}, |
77 | 82 | {"close, but no open, more", `{{< sc1 >}}{{< /sc1 >}}{{< /another >}}`, []typeText{ |
78 | 83 | tstLeftNoMD, tstSC1, tstRightNoMD, tstLeftNoMD, tstSCClose, tstSC1, tstRightNoMD, tstLeftNoMD, tstSCClose, |
79 | 84 | nti(tError, "closing tag for shortcode 'another' does not match start tag"), |
|
0 commit comments