Wondering if there's a way to disable this behaviour
julia> s = """
\"\"\"
solve_knapsack(
optimizer,
data_filename::String,
config::_AbstractConfiguration,
)
Solve the knapsack problem and return the optimal primal solution
## Arguments
- `optimizer`: an object that can be passed to `JuMP.Model` to construct a new
JuMP model.
- `data_filename`: the filename of a JSON file containing the data for the
problem.
- `config`: an object to control the type of knapsack model constructed.
Valid options are:
+ `BinaryKnapsackConfig()`
+ `IntegerKnapsackConfig()`
## Returns
\"\"\"
foo() = nothing
"""
"\"\"\"\n solve_knapsack(\n optimizer,\n data_filename::String,\n config::_AbstractConfiguration,\n )\n\nSolve the knapsack problem and return the optimal primal solution\n\n## Arguments\n\n - `optimizer`: an object that can be passed to `JuMP.Model` to construct a new\n JuMP model.\n - `data_filename`: the filename of a JSON file containing the data for the\n problem.\n - `config`: an object to control the type of knapsack model constructed.\n Valid options are:\n + `BinaryKnapsackConfig()`\n + `IntegerKnapsackConfig()`\n\n## Returns\n\"\"\"\nfoo() = nothing\n"
julia> parser = Parser()
Parser(Node(CommonMark.Document))
julia> ast = parser(s)
""" solve_knapsack( optimizer, data_filename::String, config::_AbstractConfiguration, )
Solve the knapsack problem and return the optimal primal solution
## Arguments
● optimizer: an object that can be passed to JuMP.Model to construct a new JuMP model.
● data_filename: the filename of a JSON file containing the data for the problem.
● config: an object to control the type of knapsack model constructed. Valid options are:
○ BinaryKnapsackConfig()
○ IntegerKnapsackConfig()
## Returns
""" foo() = nothing
julia> markdown(ast) |> print
"""
solve_knapsack(
optimizer,
data_filename::String,
config::_AbstractConfiguration,
)
Solve the knapsack problem and return the optimal primal solution
## Arguments
- `optimizer`: an object that can be passed to `JuMP.Model` to construct a new
JuMP model.
- `data_filename`: the filename of a JSON file containing the data for the
problem.
- `config`: an object to control the type of knapsack model constructed.
Valid options are:
+ `BinaryKnapsackConfig()`
+ `IntegerKnapsackConfig()`
## Returns
"""
foo() = nothing
julia>
If I assign the result of markdown printing to another variable and try it again it produces another newline
julia> markdown(ast) |> print
"""
solve_knapsack(
optimizer,
data_filename::String,
config::_AbstractConfiguration,
)
Solve the knapsack problem and return the optimal primal solution
## Arguments
- `optimizer`: an object that can be passed to `JuMP.Model` to construct a new
JuMP model.
- `data_filename`: the filename of a JSON file containing the data for the
problem.
- `config`: an object to control the type of knapsack model constructed.
Valid options are:
+ `BinaryKnapsackConfig()`
+ `IntegerKnapsackConfig()`
## Returns
"""
foo() = nothing
@MichaelHatherly is there a way to not alter the markdown at all? So essentially just modify Julia specific code blocks and keep the rest of the file intact.
ref https://github.com/domluna/JuliaFormatter.jl/issues/603
Wondering if there's a way to disable this behaviour
If I assign the result of markdown printing to another variable and try it again it produces another newline
At this point no new newlines are added.