Skip to content

Commit

Permalink
Fix ANSIStrings Slime rule
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrichau committed Jan 13, 2024
1 parent bfea7ea commit 4990652
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ initialize
replace: '`@string includesSubstring: `@subString'
with: '(`@string indexOfSubCollection: `@subString startingAt: 0) ~= 0';
replace: '``@string findTokens: ``@arg' byEvaluating: [ :node |
| argument |
argument := node arguments first.
| argument newNode |
newNode := node copy.
argument := newNode arguments first.
argument isLiteralNode ifTrue: [
argument value isArray
ifTrue: [ argument replaceWith: (RBLiteralNode value: (String withAll: argument value)) ].
argument value isCharacter
ifTrue: [ argument replaceWith: (RBLiteralNode value: (String with: argument value)) ] ].
node
newNode
selector: #subStrings:;
yourself ]

0 comments on commit 4990652

Please sign in to comment.