Skip to content

Commit

Permalink
Add pass-through definitions of text/HTML in extended docs trimming
Browse files Browse the repository at this point in the history
  • Loading branch information
jmert committed May 31, 2020
1 parent adf6d52 commit 9f5e6f9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion stdlib/REPL/src/docview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Markdown

using Base.Docs: catdoc, modules, DocStr, Binding, MultiDoc, keywords, isfield, namify, bindingexpr,
defined, resolve, getdoc, meta, aliasof, signature
defined, resolve, getdoc, meta, aliasof, signature, Text, HTML

import Base.Docs: doc, formatdoc, parsedoc, apropos

Expand Down Expand Up @@ -108,6 +108,9 @@ function Markdown.term(io::IO, msg::Message, columns)
printstyled(io, msg.msg; msg.fmt...)
end

trimdocs(txt::Text, brief::Bool) = txt
trimdocs(html::HTML, brief::Bool) = html

function trimdocs(md::Markdown.MD, brief::Bool)
brief || return md
md, trimmed = _trimdocs(md, brief)
Expand Down

0 comments on commit 9f5e6f9

Please sign in to comment.