julia> Pkg.update()
INFO: Updating METADATA...
ERROR: METADATA cannot be updated. Resolve problems manually in /home/morten/Julia/pkg/v0.5/METADATA.
GitError(Code:ERROR, Class:Net, Failed to resolve address for https: Name or service not known)
in macro expansion at ./libgit2/error.jl:99 [inlined]
in #fetch#52(::Base.LibGit2.FetchOptions, ::String, ::Function, ::Base.LibGit2.GitRemote, ::Array{AbstractString,1}) at ./libgit2/remote.jl:70
in (::Base.LibGit2.#kw##fetch)(::Array{Any,1}, ::Base.LibGit2.#fetch, ::Base.LibGit2.GitRemote, ::Array{AbstractString,1}) at ./<missing>:0
in #fetch#93(::String, ::String, ::Array{AbstractString,1}, ::Nullable{Base.LibGit2.AbstractCredentials}, ::Function, ::Base.LibGit2.GitRepo) at ./libgit2/libgit2.jl:164
in (::Base.Pkg.Entry.##35#41)(::Base.LibGit2.GitRepo) at ./pkg/entry.jl:371
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Test | |
macro moduletestset(ex) | |
@assert ex.head === :module | |
modulename = string("module ", ex.args[2]) | |
modulecontents = ex.args[3] | |
# Add `using Test` as the first expression in the module so that the user could | |
# use @test etc. without having to have `using Test` all over the place. | |
pushfirst!(modulecontents.args, :(using Test)) | |
# Just having `using Test` as the very first element in does not work for some |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# printmd2 | |
const INDENT = ". " | |
printmd2(xs :: Markdown2.MD) = printmd2(xs.nodes) | |
function printmd2(xs :: Vector; indent=0) | |
for x in xs | |
printmd2(x; indent = indent) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function jsonescape(s) | |
s = replace(s, '\\' => "\\\\") | |
s = replace(s, '\n' => "\\n") | |
replace(s, '"' => "\\\"") | |
end | |
@static if VERSION < v"0.7.0-DEV.3734" # https://github.com/JuliaLang/julia/pull/25872 | |
function iobuffer(sizehint) | |
b = IOBuffer(Base.StringVector(floor(Int, 1.2*sizehint)), true, true) | |
truncate(b, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This would be make.jl. | |
# | |
# The user can then interact with this configuration through the | |
# command line: | |
# | |
# julia docs/make.jl doctest | |
# julia docs/make.jl build --html | |
# julia docs/make.jl deploy --latex --html | |
using Documenter, DocumenterLaTeX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24c24 | |
< "https://fonts.googleapis.com/css?family=Lato|Ubuntu+Mono" rel= | |
--- | |
> "https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel= | |
30c30 | |
< documenterBaseURL="." | |
--- | |
> documenterBaseURL=".." | |
34,39c34,39 | |
< data-main="assets/documenter.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Expanders.jl b/src/Expanders.jl | |
index 484622f..f7025f4 100644 | |
--- a/src/Expanders.jl | |
+++ b/src/Expanders.jl | |
@@ -471,11 +471,7 @@ function Selectors.runner(::Type{ExampleBlocks}, x, page, doc) | |
# Splice the input and output into the document. | |
content = [] | |
input = droplines(x.code) | |
- | |
- # Special-case support for displaying SVG graphics. TODO: make this more general. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Credits to: | |
- https://linux.die.net/man/2/setcontext | |
- https://stackoverflow.com/questions/8456085/why-cant-i-ignore-sigsegv-signal | |
*/ | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdbool.h> | |
#include <signal.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A wrapper function to capture STDOUT and STDERR into strings. | |
# | |
# Heavily inspired by | |
# https://github.com/JuliaStats/RCall.jl/blob/c1ff136864964cf2ac04b679f0c1b3b243df7e37/src/iface.jl#L35-L46 | |
# referred to by the issue comment | |
# https://github.com/JuliaLang/julia/issues/12711#issuecomment-133045787 | |
# | |
# The Base.start_reading(stream, cb) requires fixes in Base. | |
# |