mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-09 19:47:02 +02:00
Add support for newline characters in raw string shortcode
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
3efa1d8121
commit
21ca2e9ce4
@@ -89,6 +89,12 @@ var shortCodeLexerTests = []lexerTest{
|
||||
tstLeftNoMD, tstSC1, nti(tScParam, "-ziL-.%QigdO-4"), tstRightNoMD, tstEOF}},
|
||||
{"raw string", `{{< sc1` + "`" + "Hello World" + "`" + ` >}}`, []Item{
|
||||
tstLeftNoMD, tstSC1, nti(tScParam, "Hello World"), tstRightNoMD, tstEOF}},
|
||||
{"raw string with newline", `{{< sc1` + "`" + `Hello
|
||||
World` + "`" + ` >}}`, []Item{
|
||||
tstLeftNoMD, tstSC1, nti(tScParam, `Hello
|
||||
World`), tstRightNoMD, tstEOF}},
|
||||
{"raw string with escape character", `{{< sc1` + "`" + `Hello \b World` + "`" + ` >}}`, []Item{
|
||||
tstLeftNoMD, tstSC1, nti(tScParam, `Hello \b World`), tstRightNoMD, tstEOF}},
|
||||
{"two params", `{{< sc1 param1 param2 >}}`, []Item{
|
||||
tstLeftNoMD, tstSC1, tstParam1, tstParam2, tstRightNoMD, tstEOF}},
|
||||
// issue #934
|
||||
|
Reference in New Issue
Block a user