replaceCapturedText = (strings, caps) => strings
      .filter(s => !_.isEmpty(s))
      .map(s => s.replace(regexes.captures, (m, p1) => caps[Number.parseInt(p1 || 1)]))
Search each string in `strings` for `<cap>` tags and replace them with values from `caps`.

Replacement is positional so `<cap1>` replaces with `caps[1]` and so on, with `<cap>` also
replacing from `caps[1]`.
Empty `strings` are removed from the result.

@param {Array<string>} strings - text to search for `<cap>` tags
@param {Array<string>} caps - replacement text