From: Joe Mooring Date: Sat, 14 Feb 2026 16:51:38 +0000 (-0800) Subject: docs: Fix lineNos default value in docs.yaml X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=498431d6411727626ee5d701c0a14e406a404f6c;p=brevno-suite%2Fhugo docs: Fix lineNos default value in docs.yaml --- diff --git a/docs/data/docs.yaml b/docs/data/docs.yaml index 0ef027c21..b5a519c2c 100644 --- a/docs/data/docs.yaml +++ b/docs/data/docs.yaml @@ -1345,7 +1345,7 @@ config: hl_inline: false lineAnchors: '' lineNoStart: 1 - lineNos: null + lineNos: false lineNumbersInTable: true noClasses: true style: monokai diff --git a/parser/lowercase_camel_json.go b/parser/lowercase_camel_json.go index 9d89ff020..97e29e2ce 100644 --- a/parser/lowercase_camel_json.go +++ b/parser/lowercase_camel_json.go @@ -27,6 +27,7 @@ import ( var ( keyMatchRegex = regexp.MustCompile(`\"(\w+)\":`) nullEnableBoolRegex = regexp.MustCompile(`\"(enable\w+)\":null`) + nullLineNosRegex = regexp.MustCompile(`\"(lineNos)\":null`) ) type NullBoolJSONMarshaller struct { @@ -38,7 +39,9 @@ func (c NullBoolJSONMarshaller) MarshalJSON() ([]byte, error) { if err != nil { return nil, err } - return nullEnableBoolRegex.ReplaceAll(b, []byte(`"$1": false`)), nil + b = nullEnableBoolRegex.ReplaceAll(b, []byte(`"$1": false`)) + b = nullLineNosRegex.ReplaceAll(b, []byte(`"$1": false`)) + return b, nil } // Code adapted from https://gist.github.com/piersy/b9934790a8892db1a603820c0c23e4a7