mirror of https://github.com/mpastell/Weave.jl
LTS compat ...
parent
ba8e9f4724
commit
bca3ee7dd1
|
@ -20,8 +20,7 @@ jobs:
|
|||
julia: 1
|
||||
os: linux
|
||||
script:
|
||||
- julia --project=doc/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
|
||||
Pkg.instantiate()'
|
||||
- julia --project=doc/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
|
||||
- julia --project=doc/ doc/make.jl
|
||||
after_success: skip
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ Weave will remove the first empty space from each line of documentation.
|
|||
|
||||
## Configuration via YAML Header
|
||||
|
||||
When `weave`ing markdown files, you use YAML header to provide additional metadata and configuration options.
|
||||
When `weave`ing markdown files, you can use YAML header to provide additional metadata and configuration options.
|
||||
See [Header Configuration](@ref) section for more details.
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,12 @@ function separate_header_text(text)
|
|||
m = match(HEADER_REGEX, text)
|
||||
isnothing(m) && return "", text, 0
|
||||
header_text = m[:header]
|
||||
return header_text, replace(text, HEADER_REGEX => ""; count = 1), count("\n", header_text)
|
||||
offset = @static if VERSION ≥ v"1.4"
|
||||
count("\n", header_text)
|
||||
else
|
||||
count(c->c==='\n', header_text)
|
||||
end
|
||||
return header_text, replace(text, HEADER_REGEX => ""; count = 1), offset
|
||||
end
|
||||
|
||||
# HACK:
|
||||
|
|
Loading…
Reference in New Issue