fix: most of the template blocks
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
package template
|
||||
|
||||
import "strings"
|
||||
|
||||
// CompileTemplate scans once, emitting:
|
||||
// - data blocks: inner content between a line that's exactly "{" and a line that's exactly "}"
|
||||
// - matching blocks: gaps between data blocks (excluding the brace lines themselves)
|
||||
func CompileTemplate(templateSource string) ([]Block, error) {
|
||||
templateSource = strings.TrimSuffix(templateSource, "\n")
|
||||
|
||||
var out []Block
|
||||
var curlyIndex int
|
||||
|
||||
|
Reference in New Issue
Block a user