def _capture_variable(iterator, parameters):
    """
    return the replacement string.
    this assumes the preceeding {{ has already been
    popped off.
    """
    key = ""
    next_c = next(iterator)
    while next_c != "}":
        key += next_c
        next_c = next(iterator)
    # remove the final "}"
    next(iterator)
    return parameters[key]
return the replacement string.
    this assumes the preceeding {{ has already been
    popped off.