From df6761f64904a4453c2b44cfacf47bfe479ed5be Mon Sep 17 00:00:00 2001
From: Dillon <dillonzq@outlook.com>
Date: Thu, 7 May 2020 01:16:45 +0800
Subject: [PATCH] fix(typeit): typeit shortcode newline error (#330)

---
 layouts/shortcodes/typeit.html | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/layouts/shortcodes/typeit.html b/layouts/shortcodes/typeit.html
index 45eb63e69..b295f83d5 100644
--- a/layouts/shortcodes/typeit.html
+++ b/layouts/shortcodes/typeit.html
@@ -1,4 +1,4 @@
-{{- $content := .Inner -}}
+{{- $content := trim .Inner "\n" -}}
 {{- $classList := .Get "class" | slice -}}
 {{- $tag := .Get "tag" | default "div" -}}
 
@@ -19,7 +19,6 @@
 {{- end -}}
 
 {{- /* trim the newline */ -}}
-{{- $content = trim $content "\n" -}}
 {{- $id := dict "content" $content "scratch" .Page.Scratch | partial "function/id.html" -}}
 {{- $key := .Get "group" | string | default $id -}}
 {{- $typeitMap := (.Page.Scratch.Get "this").typeitMap | default dict -}}