Skip to content

Commit

Permalink
Relax Dict -> AbstractDict for user configurations, closes #185. (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlienart authored Feb 1, 2022
1 parent ebe1cfd commit 0794936
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Literate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -459,14 +459,14 @@ function write_result(content, config; print=print)
end

"""
Literate.script(inputfile, outputdir=pwd(); config::Dict=Dict(), kwargs...)
Literate.script(inputfile, outputdir=pwd(); config::AbstractDict=Dict(), kwargs...)
Generate a plain script file from `inputfile` and write the result to `outputdir`.
See the manual section on [Configuration](@ref) for documentation
of possible configuration with `config` and other keyword arguments.
"""
function script(inputfile, outputdir=pwd(); config::Dict=Dict(), kwargs...)
function script(inputfile, outputdir=pwd(); config::AbstractDict=Dict(), kwargs...)
# preprocessing and parsing
chunks, config =
preprocessor(inputfile, outputdir; user_config=config, user_kwargs=kwargs, type=:jl)
Expand Down Expand Up @@ -497,15 +497,15 @@ end


"""
Literate.markdown(inputfile, outputdir=pwd(); config::Dict=Dict(), kwargs...)
Literate.markdown(inputfile, outputdir=pwd(); config::AbstractDict=Dict(), kwargs...)
Generate a markdown file from `inputfile` and write the result
to the directory `outputdir`.
See the manual section on [Configuration](@ref) for documentation
of possible configuration with `config` and other keyword arguments.
"""
function markdown(inputfile, outputdir=pwd(); config::Dict=Dict(), kwargs...)
function markdown(inputfile, outputdir=pwd(); config::AbstractDict=Dict(), kwargs...)
# preprocessing and parsing
chunks, config =
preprocessor(inputfile, outputdir; user_config=config, user_kwargs=kwargs, type=:md)
Expand Down Expand Up @@ -620,14 +620,14 @@ line_is_nbmeta(line::Pair) = line_is_nbmeta(line.second)
line_is_nbmeta(line) = startswith(line, "%% ")

"""
Literate.notebook(inputfile, outputdir=pwd(); config::Dict=Dict(), kwargs...)
Literate.notebook(inputfile, outputdir=pwd(); config::AbstractDict=Dict(), kwargs...)
Generate a notebook from `inputfile` and write the result to `outputdir`.
See the manual section on [Configuration](@ref) for documentation
of possible configuration with `config` and other keyword arguments.
"""
function notebook(inputfile, outputdir=pwd(); config::Dict=Dict(), kwargs...)
function notebook(inputfile, outputdir=pwd(); config::AbstractDict=Dict(), kwargs...)
# preprocessing and parsing
chunks, config =
preprocessor(inputfile, outputdir; user_config=config, user_kwargs=kwargs, type=:nb)
Expand Down

0 comments on commit 0794936

Please sign in to comment.