Skip to content

Commit

Permalink
Upgrade Documenter to v0.18 (JuliaLang#27195)
Browse files Browse the repository at this point in the history
* upgrade Documenter to v0.18

* add output = false to some doctests
  • Loading branch information
fredrikekre authored May 22, 2018
1 parent 47edaef commit d71f5db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/REQUIRE
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Compat 0.62.1 0.62.1+
DocStringExtensions 0.4.4 0.4.4+
Documenter 0.17.0 0.17.0+
Documenter 0.18.0 0.18.0+
1 change: 1 addition & 0 deletions doc/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ makedocs(
ENV["TRAVIS_JULIA_VERSION"] = "nightly"

deploydocs(
julia = "nightly",
repo = "github.com/JuliaLang/julia.git",
target = "_build/html/en",
dirname = "en",
Expand Down
8 changes: 4 additions & 4 deletions doc/src/manual/interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ list can — and often does — include other nested `Broadcasted` wrappers.
For a complete example, let's say you have created a type, `ArrayAndChar`, that stores an
array and a single character:

```jldoctest ArrayAndChar
```jldoctest ArrayAndChar; output = false
struct ArrayAndChar{T,N} <: AbstractArray{T,N}
data::Array{T,N}
char::Char
Expand All @@ -540,14 +540,14 @@ Base.showarg(io::IO, A::ArrayAndChar, toplevel) = print(io, typeof(A), " with ch

You might want broadcasting to preserve the `char` "metadata." First we define

```jldoctest ArrayAndChar
```jldoctest ArrayAndChar; output = false
Base.BroadcastStyle(::Type{<:ArrayAndChar}) = Broadcast.ArrayStyle{ArrayAndChar}()
# output
```

This means we must also define a corresponding `similar` method:
```jldoctest ArrayAndChar; filter = r"(^find_aac \(generic function with 5 methods\)$|^$)"
```jldoctest ArrayAndChar; output = false
function Base.similar(bc::Broadcast.Broadcasted{Broadcast.ArrayStyle{ArrayAndChar}}, ::Type{ElType}) where ElType
# Scan the inputs for the ArrayAndChar:
A = find_aac(bc)
Expand All @@ -562,7 +562,7 @@ find_aac(x) = x
find_aac(a::ArrayAndChar, rest) = a
find_aac(::Any, rest) = find_aac(rest)
# output
find_aac (generic function with 5 methods)
```

From these definitions, one obtains the following behavior:
Expand Down

0 comments on commit d71f5db

Please sign in to comment.