11package syntax
22
33import (
4- "github.com/logrusorgru/aurora/v3"
54 "regexp"
65 "strings"
76
7+ "github.com/logrusorgru/aurora/v3"
8+
89 "clx/constants/nerdfonts"
910
1011 "clx/constants/unicode"
12+
1113 "github.com/charmbracelet/lipgloss"
1214)
1315
@@ -36,19 +38,19 @@ func HighlightYCStartupsInHeadlines(comment string, highlightType int, enableNer
3638 if enableNerdFonts {
3739 expression = regexp .MustCompile (`\((YC ([SW]\d{2}))\)` )
3840
39- highlightedStartup := reset + getYCBarNerdFonts (`` + unicode .NoBreakSpace + `$2` , highlightType , enableNerdFonts ) +
41+ highlightedStartup := reset + getYCBarNerdFonts (nerdfonts . YCombinator + unicode .NoBreakSpace + `$2` , highlightType , enableNerdFonts ) +
4042 getHighlight (highlightType )
4143 return expression .ReplaceAllString (comment , highlightedStartup )
4244 }
4345
4446 expression = regexp .MustCompile (`\((YC [SW]\d{2})\)` )
45- highlightedStartup := reset + getYCBar (`$1` , highlightType , enableNerdFonts ) +
47+ highlightedStartup := reset + getYCBar (`$1` , highlightType ) +
4648 getHighlight (highlightType )
4749
4850 return expression .ReplaceAllString (comment , highlightedStartup )
4951}
5052
51- func getYCBar (text string , highlightType int , enableNerdFonts bool ) string {
53+ func getYCBar (text string , highlightType int ) string {
5254 switch highlightType {
5355 case Selected :
5456 return lipgloss .NewStyle ().Foreground (lipgloss .Color ("3" )).Reverse (true ).Render (text )
@@ -59,7 +61,6 @@ func getYCBar(text string, highlightType int, enableNerdFonts bool) string {
5961 default :
6062 return lipgloss .NewStyle ().Foreground (lipgloss .Color ("3" )).Render (text )
6163 }
62-
6364}
6465
6566func getYCBarNerdFonts (text string , highlightType int , enableNerdFonts bool ) string {
0 commit comments