1
1
mirror of https://github.com/walles/moar.git synced 2024-07-14 15:20:29 +03:00

Improve a comment

This commit is contained in:
Johan Walles 2023-12-28 18:39:49 +01:00
parent e80c60439b
commit 4475ce5c63

View File

@ -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)