Skip to content

Commit

Permalink
test: added additional test which was breaking
Browse files Browse the repository at this point in the history
  • Loading branch information
Oudwins committed Mar 12, 2024
1 parent ab814ae commit 1976dd0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/twmerge/modifier-utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ func MakeSplitModifiers(conf *TwMergeConfig) SplitModifiersFn {
baseClass = baseClassWithImportant
}

// fix case where there is modifier & maybePostfix which causes maybePostfix to be beyond size of baseClass
if maybePostfixModPosition != -1 && maybePostfixModPosition > modifierStart {
maybePostfixModPosition -= modifierStart
}

return baseClass, modifiers, hasImportant, maybePostfixModPosition

}
Expand Down

0 comments on commit 1976dd0

Please sign in to comment.