LTS compat ...

pull/331/head
Shuhei Kadowaki 2020-05-16 20:49:52 +09:00
parent ba8e9f4724
commit bca3ee7dd1
3 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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.

View File

@ -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: