![](https://lemmy.magnor.ovh/api/v3/image_proxy?url=https%3A%2F%2Flemmy.world%2Fpictrs%2Fimage%2F1a6bfb01-d7bb-4b30-a85b-ca12d89bedaa.jpeg)
![](https://lemmy.magnor.ovh/api/v3/image_proxy?url=https%3A%2F%2Flemmy.world%2Fpictrs%2Fimage%2Ffe882c27-7ec3-429e-a086-03d5a3efb517.png)
You can use the select-until-plugin instead of filter-list-plugin
.
selectUntil = {import:select-until-plugin}
count = 0
output
[count = 0, acronymLoop]
// count = 0, to reset the counter for each generation
acronymLoop
[word = count < acronym.length ? (n = selectUntil(noun, i => matchFirstChar(i, acronym.charAt(count))), count++, "<span contenteditable>" + emphasizeFirstChar(n) + "</span> " + acronymLoop) : '']
// Instead of filter list, we use the select-until-plugin in which the 'test' to be used was the `matchFirstChar` function that you already have.
// We start at 0, then count up (`count++`)
// Then the check is now `count < acronym.length` instead of `count <= acronym.length` since we use zero-indexing with `charAt`.
You need to have them in square brakcets to ‘run’ them:
{[subAgilityMod = 1, '']|[subAction = advnonac, '']} // The (, '') just tells the square bracket to output nothing.