mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 12:50:38 -07:00
fix: remove_last was eating an extra character
This commit is contained in:
@@ -44,7 +44,7 @@ export function remove_last (v: string, l: string) {
|
||||
const pattern = String(l)
|
||||
const index = str.lastIndexOf(pattern)
|
||||
if (index === -1) return str
|
||||
return str.substring(0, index) + str.substring(index + pattern.length + 1)
|
||||
return str.substring(0, index) + str.substring(index + pattern.length)
|
||||
}
|
||||
|
||||
export function rstrip (str: string, chars?: string) {
|
||||
|
||||
Reference in New Issue
Block a user