stencilproject / Stencil

Stencil is a simple and powerful template language for Swift.
https://stencil.fuller.li
BSD 2-Clause "Simplified" License
2.33k stars 221 forks source link

Fix for crashing range indexes when variable length is 1 #306

Closed lkuczborski closed 3 years ago

lkuczborski commented 3 years ago

This PR fixes a crash when variable length equals 1 - one single quote (') or one double quote("): Fatal error: Can't form Range with upperBound < lowerBound: file Swift/x86_64-apple-macos.swiftinterface, line 14814

krzysztofzablocki commented 3 years ago

great, this fixes a crash that occurs in the middle of template writing in Sourcery

krzysztofzablocki commented 3 years ago

@djbe good to merge? I'll need to grab this for next Sourcery Pro release