Allow wrap-start and wrap-end options to be functions