Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Added `Remotes.Forgejo` for specifying a `Remote` hosted on a Forgejo instance (such as codeberg.org). ([#2857])
* Doctests now default to the `parser_for_module` of the module that the docstring appears in, allowing modules that set their syntax version via `Base.Experimental.@set_syntax_version` to have their doctests parsed with the correct syntax automatically. Also added support for `DocTestSyntax` metadata and per-block `syntax=` attributes to explicitly specify a syntax version. ([#2874])

### Fixed

* Added error handling for `@example` block result display to avoid crashing when `display_dict` fails. ([#2876])

### Changed

* reduced time complexity from O(n^2) to O(n) to improve the initial load time for search ([#2875])
Expand Down
7 changes: 6 additions & 1 deletion src/expander_pipeline.jl
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,12 @@ function Selectors.runner(::Type{Expanders.ExampleBlocks}, node, page, doc)
input = droplines(x.code)

# Generate different in different formats and let each writer select
output = Base.invokelatest(Documenter.display_dict, result, context = :color => ansicolor)
output = try
Base.invokelatest(Documenter.display_dict, result, context = :color => ansicolor)
catch err
@error "Problem displaying result on page $(page.source): $(err)"
Dict(MIME"text/plain"() => "Error displaying result")
end
# Remove references to gensym'd module from text/plain
m = MIME"text/plain"()
if haskey(output, m)
Expand Down
Loading