diff --git a/main.go b/main.go index 6237f05..be3e0ac 100644 --- a/main.go +++ b/main.go @@ -43,7 +43,7 @@ func (pp *Preprocessor) Process( } } preCode = data[len(pref):idxEnd] - texts = append(texts, []byte{}) + //texts = append(texts, []byte{}) data = data[idxEnd+len(pp.tags[1]):] } for { diff --git a/tests/index.md.pp b/tests/index.md.pp index aef233e..eba06dd 100644 --- a/tests/index.md.pp +++ b/tests/index.md.pp @@ -1,18 +1,17 @@ -{{ +{{# os := import("os") shit := import("./tests/shit.tengo") newVar := "'this is gen shita'" - pp.println(shit.some_func()) -}}# The index testing - 1 + 1 = {{ pp.print(1+1) }} - cock {{ pp.print(newVar, "and cock") }} - -## The shit after - -checking {{ pp.printf(newVar) }} - -## File contents - +}} +Text 0 +{{ + pp.println("Code 0") +}} +Text 1 +{{ + pp.println("Code 1") +}} +Text 2 {{ bts := os.read_file("tests/somefile") pp.printf("%v\n%s", bts, bts)