From 6e35c14093577a23a78952e097b476bd95884543 Mon Sep 17 00:00:00 2001 From: Morten Piibeleht Date: Tue, 28 May 2019 11:33:31 +1200 Subject: [PATCH] Improve doctest output labelling (#1028) --- CHANGELOG.md | 3 +++ src/DocTests.jl | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90490055b0..7e3ac9ab37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ * ![Enhancement][badge-enhancement] The logo image in the HTML output will now always point to the first page in the navigation menu (as opposed to `index.html`, which may or may not exist). When using pretty URLs, the `index.html` part now omitted from the logo link URL. ([#1005][github-1005]) +* ![Enhancement][badge-enhancement] Minor changes to how doctesting errors are printed. ([#1028][github-1028]) + ## Version `v0.22.4` * ![Bugfix][badge-bugfix] Documenter no longer crashes if the build includes doctests from docstrings that are defined in files that do not exist on the file system (e.g. if a Julia Base docstring is included when running a non-source Julia build). ([#1002][github-1002]) @@ -323,6 +325,7 @@ [github-1009]: https://github.com/JuliaDocs/Documenter.jl/pull/1009 [github-1014]: https://github.com/JuliaDocs/Documenter.jl/pull/1014 [github-1015]: https://github.com/JuliaDocs/Documenter.jl/pull/1015 +[github-1028]: https://github.com/JuliaDocs/Documenter.jl/pull/1028 [documenterlatex]: https://github.com/JuliaDocs/DocumenterLaTeX.jl [documentermarkdown]: https://github.com/JuliaDocs/DocumenterMarkdown.jl diff --git a/src/DocTests.jl b/src/DocTests.jl index f4dfe0a60c..2d757fb764 100644 --- a/src/DocTests.jl +++ b/src/DocTests.jl @@ -274,13 +274,13 @@ function report(result::Result, str, doc::Documents.Document) $(result.input) - Output: + Evaluated output: - $(result.output) + $(rstrip(str)) Expected output: - $(rstrip(str)) + $(result.output) """, diff) end