We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f3ae819 + f4df4fd commit f7cd422Copy full SHA for f7cd422
src/show.jl
@@ -13,7 +13,7 @@ function Base.summary(d::AbstractDocument)
13
if typeof(d) <: Union{TokenDocument, NGramDocument}
14
o *= " * Snippet: ***SAMPLE TEXT NOT AVAILABLE***"
15
else
16
- sample_text = replace(text(d)[1:min(50, length(text(d)))], r"\s+" => " ")
+ sample_text = replace(first(text(d), 50), r"\s+" => " ")
17
o *= " * Snippet: $(sample_text)"
18
end
19
return o
0 commit comments