summaryrefslogtreecommitdiffstats
path: root/markup
diff options
context:
space:
mode:
Diffstat (limited to 'markup')
-rw-r--r--markup/highlight/config.go6
-rw-r--r--markup/highlight/highlight.go2
-rw-r--r--markup/internal/attributes/attributes.go1
3 files changed, 1 insertions, 8 deletions
diff --git a/markup/highlight/config.go b/markup/highlight/config.go
index 338ea77e5..b19e9ec1b 100644
--- a/markup/highlight/config.go
+++ b/markup/highlight/config.go
@@ -33,7 +33,6 @@ const (
lineNosKey = "linenos"
hlLinesKey = "hl_lines"
linosStartKey = "linenostart"
- noHlKey = "nohl"
)
var DefaultConfig = Config{
@@ -60,9 +59,6 @@ type Config struct {
// Use inline CSS styles.
NoClasses bool
- // No highlighting.
- NoHl bool
-
// When set, line numbers will be printed.
LineNos bool
LineNumbersInTable bool
@@ -234,8 +230,6 @@ func normalizeHighlightOptions(m map[string]any) {
for k, v := range m {
switch k {
- case noHlKey:
- m[noHlKey] = cast.ToBool(v)
case lineNosKey:
if v == "table" || v == "inline" {
m["lineNumbersInTable"] = v == "table"
diff --git a/markup/highlight/highlight.go b/markup/highlight/highlight.go
index 30f225c0b..ee07fb9ad 100644
--- a/markup/highlight/highlight.go
+++ b/markup/highlight/highlight.go
@@ -168,7 +168,7 @@ func highlight(fw hugio.FlexiWriter, code, lang string, attributes []attributes.
lexer = chromalexers.Get(lang)
}
- if lexer == nil && (cfg.GuessSyntax && !cfg.NoHl) {
+ if lexer == nil && cfg.GuessSyntax {
lexer = lexers.Analyse(code)
if lexer == nil {
lexer = lexers.Fallback
diff --git a/markup/internal/attributes/attributes.go b/markup/internal/attributes/attributes.go
index 9c147f766..b2d4a5ed6 100644
--- a/markup/internal/attributes/attributes.go
+++ b/markup/internal/attributes/attributes.go
@@ -36,7 +36,6 @@ var chromaHighlightProcessingAttributes = map[string]bool{
"lineNoStart": true,
"lineNumbersInTable": true,
"noClasses": true,
- "nohl": true,
"style": true,
"tabWidth": true,
}