From 69c783794da60d0bf12ac1340ca97323d8e26ad7 Mon Sep 17 00:00:00 2001 From: Taco de Wolff <tacodewolff@gmail.com> Date: Wed, 29 Nov 2023 17:28:09 -0300 Subject: [PATCH] HTML: support PHP template tags --- html/lex.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/html/lex.go b/html/lex.go index 8fc9073..e3cb9bd 100644 --- a/html/lex.go +++ b/html/lex.go @@ -184,6 +184,10 @@ func (l *Lexer) Next() (TokenType, []byte) { } else if c == '!' { l.r.Move(2) return l.readMarkup() + } else if 0 < len(l.tmplBegin) && l.at(l.tmplBegin...) { + l.r.Move(len(l.tmplBegin)) + l.moveTemplate() + l.hasTmpl = true } else if c == '?' { l.r.Move(1) return CommentToken, l.shiftBogusComment()