diff --git a/docs/make.jl b/docs/make.jl index 05c0f28851..745abf5f92 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -12,11 +12,10 @@ const GEN_DIR = joinpath(WORK_DIR, "generated") const ATTRIBUTE_SEARCH = Dict{String,Any}() # search terms # monkey patch `Documenter` - note that this could break on minor `Documenter` releases -@eval Documenter.Writers.HTMLWriter domify(ctx, navnode) = begin - # github.com/JuliaDocs/Documenter.jl/blob/327d155f992ec7c63e35fa2cb08f7f7c2d33409a/src/Writers/HTMLWriter.jl#L1448-L1455 - page = getpage(ctx, navnode) - map(page.elements) do elem - rec = SearchRecord(ctx, navnode, elem) +@eval Documenter.Writers.HTMLWriter domify(dctx::DCtx) = begin + ctx, navnode = dctx.ctx, dctx.navnode + return map(getpage(ctx, navnode).mdast.children) do node + rec = SearchRecord(ctx, navnode, node, node.element) ############################################################ # begin addition info = "[src=$(rec.src) fragment=$(rec.fragment) title=$(rec.title) page_title=$(rec.page_title)]" @@ -43,7 +42,7 @@ const ATTRIBUTE_SEARCH = Dict{String,Any}() # search terms end # end addition ############################################################ - domify(ctx, navnode, page.mapping[elem]) + domify(dctx, node, node.element) end end