From 02b43020a604bdccb256973849e049fab2e418f2 Mon Sep 17 00:00:00 2001 From: Peleus <245629560@qq.com> Date: Tue, 16 Jan 2024 11:08:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tag.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tag.go b/tag.go index 05f15ce..e8a9bba 100644 --- a/tag.go +++ b/tag.go @@ -114,7 +114,7 @@ func (c Carbon) parseTag() (key, value, tz string) { if carbon == "" { return "layout", defaultLayout, tz } - if len(carbon) <= 7 { + if !strings.HasPrefix(carbon, "layout:") && !strings.HasPrefix(carbon, "format:") { return "", "", tz } key = strings.TrimSpace(carbon[:6])