Skip to content

Commit cbc21f5

Browse files
authored
Merge pull request #1525 from JuliaDocs/backports-0.26.2
Backports for 0.26.2
2 parents ee0d535 + 083f592 commit cbc21f5

File tree

15 files changed

+250
-141
lines changed

15 files changed

+250
-141
lines changed

.appveyor.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/CI.yml

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- release-*
7+
pull_request:
8+
jobs:
9+
test:
10+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
version:
16+
- '1.0'
17+
- '1'
18+
- 'nightly'
19+
os:
20+
- ubuntu-latest
21+
- macos-latest
22+
- windows-latest
23+
arch:
24+
- x64
25+
include:
26+
- os: ubuntu-latest
27+
version: '1'
28+
arch: x86
29+
steps:
30+
- uses: actions/checkout@v2
31+
- uses: julia-actions/setup-julia@v1
32+
with:
33+
version: ${{ matrix.version }}
34+
arch: ${{ matrix.arch }}
35+
show-versioninfo: true
36+
- uses: actions/cache@v1
37+
env:
38+
cache-name: cache-artifacts
39+
with:
40+
path: ~/.julia/artifacts
41+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
42+
restore-keys: |
43+
${{ runner.os }}-test-${{ env.cache-name }}-
44+
${{ runner.os }}-test-
45+
${{ runner.os }}-
46+
- uses: julia-actions/julia-runtest@latest
47+
- uses: julia-actions/julia-processcoverage@v1
48+
- uses: codecov/codecov-action@v1
49+
with:
50+
file: lcov.info
51+
52+
latex:
53+
name: "PDF/LaTeX backend"
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v2
57+
- uses: julia-actions/setup-julia@v1
58+
with:
59+
version: '1'
60+
- uses: actions/cache@v1
61+
env:
62+
cache-name: cache-artifacts
63+
with:
64+
path: ~/.julia/artifacts
65+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
66+
restore-keys: |
67+
${{ runner.os }}-test-${{ env.cache-name }}-
68+
${{ runner.os }}-test-
69+
${{ runner.os }}-
70+
- run: |
71+
julia --project=test/examples -e '
72+
using Pkg
73+
Pkg.instantiate()
74+
Pkg.develop(PackageSpec(path=pwd()))
75+
Pkg.add(["IOCapture", "DocumenterMarkdown"])'
76+
- run: julia --project=test/examples test/examples/tests_latex.jl
77+
- uses: julia-actions/julia-processcoverage@v1
78+
- uses: codecov/codecov-action@v1
79+
with:
80+
file: lcov.info
81+
82+
themes:
83+
name: "CSS for HTML themes"
84+
runs-on: ubuntu-latest
85+
steps:
86+
- uses: actions/checkout@v2
87+
- uses: julia-actions/setup-julia@v1
88+
with:
89+
version: '1'
90+
- uses: actions/cache@v1
91+
env:
92+
cache-name: cache-artifacts
93+
with:
94+
path: ~/.julia/artifacts
95+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
96+
restore-keys: |
97+
${{ runner.os }}-test-${{ env.cache-name }}-
98+
${{ runner.os }}-test-
99+
${{ runner.os }}-
100+
- run: |
101+
julia --project=test/themes/ -e '
102+
using Pkg
103+
Pkg.instantiate()
104+
Pkg.develop(PackageSpec(path=pwd()))'
105+
- run: julia --project=test/themes test/themes/themes.jl
106+
107+
docs:
108+
name: 'Documentation: ${{ matrix.makejl }}'
109+
runs-on: ubuntu-latest
110+
strategy:
111+
matrix:
112+
include:
113+
- jlenv: 'docs/'
114+
makejl: 'docs/make.jl'
115+
- jlenv: 'docs/pdf/'
116+
makejl: 'docs/pdf/make.jl'
117+
steps:
118+
- uses: actions/checkout@v2
119+
- uses: julia-actions/setup-julia@v1
120+
with:
121+
version: '1'
122+
- run: |
123+
julia --project=${{ matrix.jlenv }} -e '
124+
using Pkg
125+
Pkg.develop(PackageSpec(path=pwd()))
126+
Pkg.instantiate()'
127+
- run: julia --project=${{ matrix.jlenv }} --color=yes ${{ matrix.makejl }}
128+
env:
129+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.travis.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Documenter.jl changelog
22

3+
## Version `v0.26.2`
4+
5+
* ![Enhancement][badge-enhancement] `doctest()` no longer throws an error if cleaning up the temporary directory fails for some reason. ([#1513][github-1513], [#1526][github-1526])
6+
7+
* ![Enhancement][badge-enhancement] Cosmetic improvements to the PDF output. ([#1342][github-1342], [#1527][github-1527])
8+
9+
* ![Bugfix][badge-bugfix] Script-type doctests that have an empty output section no longer crash Documenter. ([#1510][github-1510])
10+
11+
* ![Bugfix][badge-bugfix] When checking for authentication keys when deploying, Documenter now more appropriately checks if the environment variables are non-empty, rather than just whether they are defined. ([#1511][github-1511])
12+
13+
* ![Bugfix][badge-bugfix] Doctests now correctly handle the case when the repository has been checked out with `CRLF` line endings (which can happen on Windows with `core.autocrlf=true`). ([#1516][github-1516], [#1519][github-1519], [#1520][github-1520])
14+
15+
* ![Bugfix][badge-bugfix] Multiline equations are now correctly handled in at-block outputs. ([#1518][github-1518])
16+
317
## Version `v0.26.1`
418

519
* ![Bugfix][badge-bugfix] HTML assets that are copied directly from Documenters source to the build output now has correct file permissions. ([#1497][github-1497])
@@ -682,6 +696,7 @@
682696
[github-1337]: https://github.com/JuliaDocs/Documenter.jl/issues/1337
683697
[github-1338]: https://github.com/JuliaDocs/Documenter.jl/issues/1338
684698
[github-1339]: https://github.com/JuliaDocs/Documenter.jl/pull/1339
699+
[github-1342]: https://github.com/JuliaDocs/Documenter.jl/issues/1342
685700
[github-1344]: https://github.com/JuliaDocs/Documenter.jl/issues/1344
686701
[github-1345]: https://github.com/JuliaDocs/Documenter.jl/pull/1345
687702
[github-1349]: https://github.com/JuliaDocs/Documenter.jl/pull/1349
@@ -722,6 +737,15 @@
722737
[github-1491]: https://github.com/JuliaDocs/Documenter.jl/pull/1491
723738
[github-1493]: https://github.com/JuliaDocs/Documenter.jl/pull/1493
724739
[github-1497]: https://github.com/JuliaDocs/Documenter.jl/pull/1497
740+
[github-1510]: https://github.com/JuliaDocs/Documenter.jl/pull/1510
741+
[github-1511]: https://github.com/JuliaDocs/Documenter.jl/pull/1511
742+
[github-1513]: https://github.com/JuliaDocs/Documenter.jl/issues/1513
743+
[github-1516]: https://github.com/JuliaDocs/Documenter.jl/issues/1516
744+
[github-1518]: https://github.com/JuliaDocs/Documenter.jl/pull/1518
745+
[github-1519]: https://github.com/JuliaDocs/Documenter.jl/pull/1519
746+
[github-1520]: https://github.com/JuliaDocs/Documenter.jl/pull/1520
747+
[github-1526]: https://github.com/JuliaDocs/Documenter.jl/pull/1526
748+
[github-1527]: https://github.com/JuliaDocs/Documenter.jl/pull/1527
725749

726750
[julia-38079]: https://github.com/JuliaLang/julia/issues/38079
727751

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Documenter"
22
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3-
version = "0.26.1"
3+
version = "0.26.2"
44

55
[deps]
66
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

docs/src/man/hosting.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ jobs:
199199
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
200200
- name: Build and deploy
201201
env:
202-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
203-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
202+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
203+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
204204
run: julia --project=docs/ docs/make.jl
205205
```
206206
@@ -259,12 +259,6 @@ to the configuration file, as showed in the [previous section](@ref GitHub-Actio
259259
of the deployment is the same as the current repository. In order to push
260260
elsewhere you should instead use a SSH deploy key.
261261

262-
!!! warning "GitHub Pages and GitHub Token"
263-
Currently the GitHub Page build is not triggered when the GitHub provided
264-
`GITHUB_TOKEN` is used for authentication. See
265-
[issue #1177](https://github.com/JuliaDocs/Documenter.jl/issues/1177)
266-
for more information.
267-
268262
### Authentication: SSH Deploy Keys
269263

270264
It is also possible to authenticate using a SSH deploy key, just as described in

src/DocTests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ function eval_script(block, sandbox, meta::Dict, doc::Documents.Document, page)
239239
#
240240
#
241241
# to mark `input`/`output` separation.
242-
input, output = split(block.code, "# output\n", limit = 2)
242+
input, output = split(block.code, r"^# output$"m, limit = 2)
243243
input = rstrip(input, '\n')
244244
output = lstrip(output, '\n')
245245
result = Result(block, input, output, meta[:CurrentFile])

src/Documenter.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,9 @@ the generated html. The following entries are valid in the `versions` vector:
405405
**`push_preview`** a boolean that specifies if preview documentation should be
406406
deployed from pull requests or not. If your published documentation is hosted
407407
at `"https://USER.github.io/PACKAGE.jl/stable`, by default the preview will be
408-
hosted at `"https://USER.github.io/PACKAGE.jl/previews/PR##"`.
408+
hosted at `"https://USER.github.io/PACKAGE.jl/previews/PR##"`. This feature
409+
works for pull requests with head branch in the same repository, i.e. not from
410+
forks.
409411
410412
**`branch_previews`** is the branch to which pull request previews are deployed.
411413
It defaults to the value of `branch`.
@@ -823,7 +825,11 @@ function doctest(
823825
@error "Doctesting failed" exception=(err, catch_backtrace())
824826
false
825827
finally
826-
rm(dir; recursive=true)
828+
try
829+
rm(dir; recursive=true)
830+
catch e
831+
@warn "Documenter was unable to clean up the temporary directory $(dir)" exception = e
832+
end
827833
end
828834
end
829835
@testset "$testset" begin

src/Writers/HTMLWriter.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,9 +1762,9 @@ function mdconvert(d::Dict{MIME,Any}, parent; kwargs...)
17621762
# unwrap it first, since when we output Markdown.LaTeX objects we put the correct
17631763
# delimiters around it anyway.
17641764
latex = d[MIME"text/latex"()]
1765-
equation = false
1766-
m_bracket = match(r"\s*\\\[(.*)\\\]\s*", latex)
1767-
m_dollars = match(r"\s*\$\$(.*)\$\$\s*", latex)
1765+
# Make sure to match multiline strings!
1766+
m_bracket = match(r"\s*\\\[(.*)\\\]\s*"s, latex)
1767+
m_dollars = match(r"\s*\$\$(.*)\$\$\s*"s, latex)
17681768
if m_bracket === nothing && m_dollars === nothing
17691769
out = Utilities.mdparse(latex; mode = :single)
17701770
else

src/Writers/LaTeXWriter.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,13 @@ function writeheader(io::IO, doc::Documents.Document)
214214
isfile(custom) ? cp(custom, "custom.sty"; force = true) : touch("custom.sty")
215215
preamble =
216216
"""
217-
\\documentclass{memoir}
217+
\\documentclass[oneside]{memoir}
218218
219219
\\usepackage{./documenter}
220220
\\usepackage{./custom}
221221
222+
\\settocdepth{section}
223+
222224
\\title{
223225
{\\HUGE $(doc.user.sitename)}\\\\
224226
{\\Large $(get(ENV, "TRAVIS_TAG", ""))}
@@ -229,6 +231,7 @@ function writeheader(io::IO, doc::Documents.Document)
229231
230232
\\frontmatter
231233
\\maketitle
234+
\\clearpage
232235
\\tableofcontents
233236
234237
\\mainmatter

0 commit comments

Comments
 (0)