@@ -80,18 +80,24 @@ function vprint(level::Integer, args...)
8080 nothing
8181end
8282
83+ # Continuous horizontal rule (U+2500). A run of these renders as one unbroken
84+ # line, unlike the gappy ASCII hyphen. Used for banners and section dividers.
85+ hrule (width:: Integer = 60 ) = " ─" ^ width
86+
8387"""
8488 print_phase_banner(level, title; width=60)
8589
86- Print a centered, full-width banner bounded by long-dash rules announcing a
87- high-level phase (e.g. tuning, final training, code-processor training).
88- Gated by `level` exactly like [`vprintln`](@ref); defaults to a banner width
89- of `width` characters and is preceded by a blank line so it stands out.
90+ Print a centered, full-width banner bounded by continuous horizontal rules
91+ (see [`hrule`](@ref)) announcing a high-level phase (e.g. tuning, final
92+ training, code-processor training). Gated by `level` exactly like
93+ [`vprintln`](@ref); the banner is `width` columns wide and is preceded by a
94+ blank line so it stands out. Centering uses `textwidth`, so titles containing
95+ double-width glyphs (emoji) still land in the middle.
9096"""
9197function print_phase_banner (level:: Integer , title:: AbstractString ; width:: Integer = 60 )
9298 _should_log (level) || return nothing
93- rule = " - " ^ width
94- pad = max (0 , (width - length (title)) ÷ 2 )
99+ rule = hrule ( width)
100+ pad = max (0 , (width - textwidth (title)) ÷ 2 )
95101 println ()
96102 println (rule)
97103 println (" " ^ pad, title)
0 commit comments