Skip to content

Commit

Permalink
Merge pull request #1525 from JuliaDocs/backports-0.26.2
Browse files Browse the repository at this point in the history
Backports for 0.26.2
  • Loading branch information
mortenpi authored Feb 15, 2021
2 parents ee0d535 + 083f592 commit cbc21f5
Show file tree
Hide file tree
Showing 15 changed files with 250 additions and 141 deletions.
37 changes: 0 additions & 37 deletions .appveyor.yml

This file was deleted.

130 changes: 130 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: CI
on:
push:
branches:
- master
- release-*
pull_request:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.0'
- '1'
- 'nightly'
os:
- ubuntu-latest
- macos-latest
- windows-latest
arch:
- x64
include:
- os: ubuntu-latest
version: '1'
arch: x86
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
show-versioninfo: true
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-runtest@latest
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info

latex:
name: "PDF/LaTeX backend"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- run: |
julia --project=test/examples -e '
using Pkg
Pkg.instantiate()
Pkg.develop(PackageSpec(path=pwd()))
Pkg.add(["IOCapture", "DocumenterMarkdown"])'
- run: julia --project=test/examples test/examples/tests_latex.jl
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info

themes:
name: "CSS for HTML themes"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- run: |
julia --project=test/themes/ -e '
using Pkg
Pkg.instantiate()
Pkg.develop(PackageSpec(path=pwd()))'
- run: julia --project=test/themes test/themes/themes.jl

docs:
name: 'Documentation: ${{ matrix.makejl }}'
runs-on: ubuntu-latest
strategy:
matrix:
include:
- jlenv: 'docs/'
makejl: 'docs/make.jl'
- jlenv: 'docs/pdf/'
makejl: 'docs/pdf/make.jl'
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: |
julia --project=${{ matrix.jlenv }} -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- run: julia --project=${{ matrix.jlenv }} --color=yes ${{ matrix.makejl }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
59 changes: 0 additions & 59 deletions .travis.yml

This file was deleted.

24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Documenter.jl changelog

## Version `v0.26.2`

* ![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])

* ![Enhancement][badge-enhancement] Cosmetic improvements to the PDF output. ([#1342][github-1342], [#1527][github-1527])

* ![Bugfix][badge-bugfix] Script-type doctests that have an empty output section no longer crash Documenter. ([#1510][github-1510])

* ![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])

* ![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])

* ![Bugfix][badge-bugfix] Multiline equations are now correctly handled in at-block outputs. ([#1518][github-1518])

## Version `v0.26.1`

* ![Bugfix][badge-bugfix] HTML assets that are copied directly from Documenters source to the build output now has correct file permissions. ([#1497][github-1497])
Expand Down Expand Up @@ -682,6 +696,7 @@
[github-1337]: https://github.com/JuliaDocs/Documenter.jl/issues/1337
[github-1338]: https://github.com/JuliaDocs/Documenter.jl/issues/1338
[github-1339]: https://github.com/JuliaDocs/Documenter.jl/pull/1339
[github-1342]: https://github.com/JuliaDocs/Documenter.jl/issues/1342
[github-1344]: https://github.com/JuliaDocs/Documenter.jl/issues/1344
[github-1345]: https://github.com/JuliaDocs/Documenter.jl/pull/1345
[github-1349]: https://github.com/JuliaDocs/Documenter.jl/pull/1349
Expand Down Expand Up @@ -722,6 +737,15 @@
[github-1491]: https://github.com/JuliaDocs/Documenter.jl/pull/1491
[github-1493]: https://github.com/JuliaDocs/Documenter.jl/pull/1493
[github-1497]: https://github.com/JuliaDocs/Documenter.jl/pull/1497
[github-1510]: https://github.com/JuliaDocs/Documenter.jl/pull/1510
[github-1511]: https://github.com/JuliaDocs/Documenter.jl/pull/1511
[github-1513]: https://github.com/JuliaDocs/Documenter.jl/issues/1513
[github-1516]: https://github.com/JuliaDocs/Documenter.jl/issues/1516
[github-1518]: https://github.com/JuliaDocs/Documenter.jl/pull/1518
[github-1519]: https://github.com/JuliaDocs/Documenter.jl/pull/1519
[github-1520]: https://github.com/JuliaDocs/Documenter.jl/pull/1520
[github-1526]: https://github.com/JuliaDocs/Documenter.jl/pull/1526
[github-1527]: https://github.com/JuliaDocs/Documenter.jl/pull/1527

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

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Documenter"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.26.1"
version = "0.26.2"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand Down
10 changes: 2 additions & 8 deletions docs/src/man/hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ jobs:
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
run: julia --project=docs/ docs/make.jl
```
Expand Down Expand Up @@ -259,12 +259,6 @@ to the configuration file, as showed in the [previous section](@ref GitHub-Actio
of the deployment is the same as the current repository. In order to push
elsewhere you should instead use a SSH deploy key.

!!! warning "GitHub Pages and GitHub Token"
Currently the GitHub Page build is not triggered when the GitHub provided
`GITHUB_TOKEN` is used for authentication. See
[issue #1177](https://github.com/JuliaDocs/Documenter.jl/issues/1177)
for more information.

### Authentication: SSH Deploy Keys

It is also possible to authenticate using a SSH deploy key, just as described in
Expand Down
2 changes: 1 addition & 1 deletion src/DocTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ function eval_script(block, sandbox, meta::Dict, doc::Documents.Document, page)
#
#
# to mark `input`/`output` separation.
input, output = split(block.code, "# output\n", limit = 2)
input, output = split(block.code, r"^# output$"m, limit = 2)
input = rstrip(input, '\n')
output = lstrip(output, '\n')
result = Result(block, input, output, meta[:CurrentFile])
Expand Down
10 changes: 8 additions & 2 deletions src/Documenter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,9 @@ the generated html. The following entries are valid in the `versions` vector:
**`push_preview`** a boolean that specifies if preview documentation should be
deployed from pull requests or not. If your published documentation is hosted
at `"https://USER.github.io/PACKAGE.jl/stable`, by default the preview will be
hosted at `"https://USER.github.io/PACKAGE.jl/previews/PR##"`.
hosted at `"https://USER.github.io/PACKAGE.jl/previews/PR##"`. This feature
works for pull requests with head branch in the same repository, i.e. not from
forks.
**`branch_previews`** is the branch to which pull request previews are deployed.
It defaults to the value of `branch`.
Expand Down Expand Up @@ -823,7 +825,11 @@ function doctest(
@error "Doctesting failed" exception=(err, catch_backtrace())
false
finally
rm(dir; recursive=true)
try
rm(dir; recursive=true)
catch e
@warn "Documenter was unable to clean up the temporary directory $(dir)" exception = e
end
end
end
@testset "$testset" begin
Expand Down
6 changes: 3 additions & 3 deletions src/Writers/HTMLWriter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1762,9 +1762,9 @@ function mdconvert(d::Dict{MIME,Any}, parent; kwargs...)
# unwrap it first, since when we output Markdown.LaTeX objects we put the correct
# delimiters around it anyway.
latex = d[MIME"text/latex"()]
equation = false
m_bracket = match(r"\s*\\\[(.*)\\\]\s*", latex)
m_dollars = match(r"\s*\$\$(.*)\$\$\s*", latex)
# Make sure to match multiline strings!
m_bracket = match(r"\s*\\\[(.*)\\\]\s*"s, latex)
m_dollars = match(r"\s*\$\$(.*)\$\$\s*"s, latex)
if m_bracket === nothing && m_dollars === nothing
out = Utilities.mdparse(latex; mode = :single)
else
Expand Down
5 changes: 4 additions & 1 deletion src/Writers/LaTeXWriter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,13 @@ function writeheader(io::IO, doc::Documents.Document)
isfile(custom) ? cp(custom, "custom.sty"; force = true) : touch("custom.sty")
preamble =
"""
\\documentclass{memoir}
\\documentclass[oneside]{memoir}
\\usepackage{./documenter}
\\usepackage{./custom}
\\settocdepth{section}
\\title{
{\\HUGE $(doc.user.sitename)}\\\\
{\\Large $(get(ENV, "TRAVIS_TAG", ""))}
Expand All @@ -229,6 +231,7 @@ function writeheader(io::IO, doc::Documents.Document)
\\frontmatter
\\maketitle
\\clearpage
\\tableofcontents
\\mainmatter
Expand Down
Loading

2 comments on commit cbc21f5

@mortenpi
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register branch=release-0.26

Release notes:

A patch release with bugfixes and enhancements. The changes are documented in the CHANGELOG.md file.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/30066

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.26.2 -m "<description of version>" cbc21f5d26806c4308c3cebbcdb4ba6346fa3d79
git push origin v0.26.2

Please sign in to comment.