docs: Fix lineNos default value in docs.yaml

This commit is contained in:
Joe Mooring
2026-02-14 08:51:38 -08:00
committed by Bjørn Erik Pedersen
parent 773664b812
commit 498431d641
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -1345,7 +1345,7 @@ config:
hl_inline: false
lineAnchors: ''
lineNoStart: 1
lineNos: null
lineNos: false
lineNumbersInTable: true
noClasses: true
style: monokai
+4 -1
View 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