From b45ad0e54e5a10f2318a27940a1a86d6e3c549a9 Mon Sep 17 00:00:00 2001 From: xing Date: Fri, 5 Apr 2024 16:23:59 +0800 Subject: [PATCH] fix enlighterjs config --- app/plugins/wphandle/enlightjs/enlighterjs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/plugins/wphandle/enlightjs/enlighterjs.go b/app/plugins/wphandle/enlightjs/enlighterjs.go index e456284..e581d8a 100644 --- a/app/plugins/wphandle/enlightjs/enlighterjs.go +++ b/app/plugins/wphandle/enlightjs/enlighterjs.go @@ -22,7 +22,7 @@ type Options struct { Linehover bool `json:"linehover,omitempty"` RawcodeDbclick bool `json:"rawcodeDbclick,omitempty"` TextOverflow string `json:"textOverflow,omitempty"` - Linenumbers int64 `json:"linenumbers,omitempty"` + Linenumbers bool `json:"linenumbers,omitempty"` Theme string `json:"theme,omitempty"` Language string `json:"language,omitempty"` RetainCssClasses bool `json:"retainCssClasses,omitempty"` @@ -58,7 +58,7 @@ func EnlighterJS(h *wp.Handle) { Linehover: maps.GetStrAnyValWithDefaults(opp, "enlighterjs-linehover", true), RawcodeDbclick: maps.GetStrAnyValWithDefaults(opp, "enlighterjs-rawcodedbclick", true), TextOverflow: maps.GetStrAnyValWithDefaults(opp, "enlighterjs-textoverflow", "break"), - Linenumbers: maps.GetStrAnyValWithDefaults[int64](opp, "enlighterjs-linenumbers", 1), + Linenumbers: maps.GetStrAnyValWithDefaults[bool](opp, "enlighterjs-linenumbers", true), Theme: maps.GetStrAnyValWithDefaults(opp, "enlighterjs-theme", "enlighter"), Language: maps.GetStrAnyValWithDefaults(opp, "enlighterjs-language", "generic"), RetainCssClasses: maps.GetStrAnyValWithDefaults(opp, "enlighterjs-retaincss", false),