]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
docs: Fix lineNos default value in docs.yaml
authorJoe Mooring <joe.mooring@veriphor.com>
Sat, 14 Feb 2026 16:51:38 +0000 (08:51 -0800)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 14 Feb 2026 18:15:02 +0000 (19:15 +0100)
docs/data/docs.yaml
parser/lowercase_camel_json.go

index 0ef027c2151f23a51da69e0359ddd9100aaa810e..b5a519c2cae87cbda7fef6df1af4ce10ee9b26e3 100644 (file)
@@ -1345,7 +1345,7 @@ config:
       hl_inline: false
       lineAnchors: ''
       lineNoStart: 1
-      lineNos: null
+      lineNos: false
       lineNumbersInTable: true
       noClasses: true
       style: monokai
index 9d89ff020dd413ddea6f7da94adb9f92a2c629ca..97e29e2cea525b0e8d5c106f797e84204d8b2129 100644 (file)
@@ -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