From b85b6e83ca0816ffb6b206bdcf2f47510fbbd6c7 Mon Sep 17 00:00:00 2001 From: fukunee Date: Sun, 15 Nov 2026 17:47:26 +0800 Subject: [PATCH] Make citation lines tolerate CRLF endings --- layouts/shortcodes/note.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/shortcodes/note.html b/layouts/shortcodes/note.html index e735509..ea85ed6 100644 --- a/layouts/shortcodes/note.html +++ b/layouts/shortcodes/note.html @@ -11,8 +11,9 @@ {{- $page.Store.Set "noteCount" $n -}} {{ $n }}{{ $n }}{{- with .Inner -}} {{- if eq $class "cite" -}} -{{- range split (trim . "\n") "\n" -}} -{{- if ne (trim . " ") "" -}}{{ . | $page.RenderString (dict "display" "inline") }}{{- end -}} +{{- range split (trim . "\r\n") "\n" -}} +{{- $line := trim . "\r" -}} +{{- if ne (trim $line " ") "" -}}{{ $line | $page.RenderString (dict "display" "inline") }}{{- end -}} {{- end -}} {{- else -}} {{- . | $page.RenderString (dict "display" "inline") -}}