diff --git a/src/Weave.jl b/src/Weave.jl index de04b0b..6bcac6a 100644 --- a/src/Weave.jl +++ b/src/Weave.jl @@ -7,6 +7,7 @@ const PKG_DIR = normpath(@__DIR__, "..") const TEMPLATE_DIR = normpath(PKG_DIR, "templates") const WEAVE_OPTION_NAME = "weave_options" const WEAVE_OPTION_NAME_DEPRECATED = "options" # remove this when tagging v0.11 +const WEAVE_OPTION_DEPRECATE_ID = "weave_option_duplicate_id" # keeps paths of sample documents for easy try const EXAMPLE_FOLDER = normpath(PKG_DIR, "examples") @@ -130,7 +131,7 @@ function weave( # NOTE: these YAML options can NOT be given dynamically weave_options = get(doc.header, WEAVE_OPTION_NAME, nothing) if haskey(doc.header, WEAVE_OPTION_NAME_DEPRECATED) - @warn "Weave: `options` key is deprecated. Use `weave_options` key instead." + @warn "Weave: `options` key is deprecated. Use `weave_options` key instead." _id = WEAVE_OPTION_DEPRECATE_ID maxlog = 1 weave_options = get(doc.header, WEAVE_OPTION_NAME_DEPRECATED, nothing) end diff --git a/src/format.jl b/src/format.jl index 090fbee..d2b3b09 100644 --- a/src/format.jl +++ b/src/format.jl @@ -99,7 +99,7 @@ function restore_header!(doc) # only strips Weave headers delete!(doc.header, WEAVE_OPTION_NAME) if haskey(doc.header, WEAVE_OPTION_NAME_DEPRECATED) - @warn "Weave: `options` key is deprecated. Use `weave_options` key instead." + @warn "Weave: `options` key is deprecated. Use `weave_options` key instead." _id = WEAVE_OPTION_DEPRECATE_ID maxlog = 1 delete!(doc.header, WEAVE_OPTION_NAME_DEPRECATED) end isempty(doc.header) && return diff --git a/src/reader/reader.jl b/src/reader/reader.jl index f13ac31..3af9bc3 100644 --- a/src/reader/reader.jl +++ b/src/reader/reader.jl @@ -18,7 +18,7 @@ function WeaveDoc(source, informat = nothing) end end if haskey(header, WEAVE_OPTION_NAME_DEPRECATED) - @warn "Weave: `options` key is deprecated. Use `weave_options` key instead." + @warn "Weave: `options` key is deprecated. Use `weave_options` key instead." _id = WEAVE_OPTION_DEPRECATE_ID maxlog = 1 for key in keys(chunk_defaults) if (val = get(header[WEAVE_OPTION_NAME_DEPRECATED], string(key), nothing)) !== nothing chunk_defaults[key] = val