From e3d61d819f81c807364a6ec41e44e92eed3bbb8b Mon Sep 17 00:00:00 2001 From: surdeus Date: Sun, 9 Jun 2024 17:51:45 +0500 Subject: [PATCH] feat: added tool setting the mod dir. --- main.go | 2 +- tests/index.md.pp | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) 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)