From c40624d44e5a130bcbc588348cfecbeea9b87b1a Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Wed, 11 Dec 2024 11:28:24 +0100 Subject: [PATCH 1/2] Package docstring: more peaceful README introduction --- stdlib/REPL/src/docview.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stdlib/REPL/src/docview.jl b/stdlib/REPL/src/docview.jl index 566046f325499..7b5033d0049c3 100644 --- a/stdlib/REPL/src/docview.jl +++ b/stdlib/REPL/src/docview.jl @@ -416,7 +416,10 @@ function summarize(io::IO, m::Module, binding::Binding; nlines::Int = 200) if !isnothing(readme_path) readme_lines = readlines(readme_path) isempty(readme_lines) && return # don't say we are going to print empty file - println(io, "# Displaying contents of readme found at `$(readme_path)`") + println(io, "---") + println(io) + println(io, "_Package description from `$(basename(readme_path))`:_") + println(io) for line in first(readme_lines, nlines) println(io, line) end From f4f54e326f8d144ba221585adda3525b2652f590 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Wed, 11 Dec 2024 11:40:14 +0100 Subject: [PATCH 2/2] Update docview.jl --- stdlib/REPL/src/docview.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stdlib/REPL/src/docview.jl b/stdlib/REPL/src/docview.jl index 7b5033d0049c3..0868d3e80c824 100644 --- a/stdlib/REPL/src/docview.jl +++ b/stdlib/REPL/src/docview.jl @@ -416,10 +416,9 @@ function summarize(io::IO, m::Module, binding::Binding; nlines::Int = 200) if !isnothing(readme_path) readme_lines = readlines(readme_path) isempty(readme_lines) && return # don't say we are going to print empty file - println(io, "---") println(io) + println(io, "---") println(io, "_Package description from `$(basename(readme_path))`:_") - println(io) for line in first(readme_lines, nlines) println(io, line) end