Call callback in replace/append/prepend directives when an open directive is found