diff --git a/RecipesBase/.gitignore b/RecipesBase/.gitignore index 3f02ca741..46a00d5d7 100644 --- a/RecipesBase/.gitignore +++ b/RecipesBase/.gitignore @@ -2,3 +2,4 @@ *.jl.*.cov *.jl.mem Manifest.toml +dev/ diff --git a/RecipesBase/src/RecipesBase.jl b/RecipesBase/src/RecipesBase.jl index 2317f4fad..36c9c54b6 100644 --- a/RecipesBase/src/RecipesBase.jl +++ b/RecipesBase/src/RecipesBase.jl @@ -185,7 +185,9 @@ function process_recipe_body!(expr::Expr) set_expr end - # TODO elseif it's a @series macrocall, add a series block and push to the `series` list + elseif e.head == :return + # To allow `return` in recipes just extract the returned arguments. + expr.args[i] = first(e.args) elseif e.head != :call # we want to recursively replace the arrows, but not inside function calls