Skip to content

Commit

Permalink
Improve a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
walles committed Dec 28, 2023
1 parent e80c604 commit 4475ce5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions m/styling.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ func consumeLessTermcapEnvs(chromaStyle *chroma.Style, chromaFormatter *chroma.F
setStyle(&manPageBold, "LESS_TERMCAP_md", twinStyleFromChroma(chromaStyle, chromaFormatter, chroma.GenericStrong))
setStyle(&manPageUnderline, "LESS_TERMCAP_us", twinStyleFromChroma(chromaStyle, chromaFormatter, chroma.GenericUnderline))

// Special treat this because standoutStyle defaults to nil, and should be
// set only if there is a style defined through the environment.
// Since standoutStyle defaults to nil we can't just pass it to setStyle().
// Instead we give it special treatment here and set it only if its
// environment variable is set.
//
// Ref: https://github.com/walles/moar/issues/171
envValue := os.Getenv("LESS_TERMCAP_so")
if envValue != "" {
style := termcapToStyle(envValue)
Expand Down

0 comments on commit 4475ce5

Please sign in to comment.