Skip to content

Commit

Permalink
fix: revert baseStyles merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed Jan 25, 2025
1 parent 0cba37c commit ab80200
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/core/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ func NewFile(src string, config *Config) (*File, error) {
baseStyles := config.GBaseStyles
checks := make(map[string]bool)

names := []string{}
for _, fp := range filepaths {
for _, sec := range config.StyleKeys {
if pat, found := config.SecToPat[sec]; found && pat.Match(fp) {
names = append(names, config.SBaseStyles[sec]...)
baseStyles = config.SBaseStyles[sec]
}
}

Expand All @@ -91,10 +90,6 @@ func NewFile(src string, config *Config) (*File, error) {
}
}

if len(names) > 0 {
baseStyles = UniqueStrings(names)
}

lang := "en"
for syntax, code := range config.FormatToLang {
sec, err := glob.Compile(syntax)
Expand Down

0 comments on commit ab80200

Please # to comment.