mirror of
https://github.com/urbit/shrub.git
synced 2025-01-04 10:32:34 +03:00
Improve rendering of multi-line %exp messages in talk
This commit is contained in:
parent
3e028fde21
commit
470a22cae4
@ -2314,7 +2314,15 @@
|
||||
url+(crip (apix:en-purl:html url.sep))
|
||||
::
|
||||
$exp
|
||||
mor+~[txt+"# {(trip exp.sep)}" tan+res.sep]
|
||||
=/ texp=tape ['>' ' ' (trip exp.sep)]
|
||||
:- %mor
|
||||
|- ^- (list sole-effect:sole-sur)
|
||||
?: =("" texp) [tan+res.sep ~]
|
||||
=/ newl (find "\0a" texp)
|
||||
?~ newl [txt+texp $(texp "")]
|
||||
=+ (trim u.newl texp)
|
||||
:- txt+(scag u.newl texp)
|
||||
$(texp [' ' ' ' (slag +(u.newl) texp)])
|
||||
::
|
||||
$ire
|
||||
=+ num=(~(get by known) top.sep)
|
||||
@ -2399,7 +2407,11 @@
|
||||
==
|
||||
::
|
||||
$exp
|
||||
:- (tr-chow wyd '#' ' ' (trip exp.sep))
|
||||
=+ texp=(trip exp.sep)
|
||||
=+ newline=(find "\0a" texp)
|
||||
=? texp ?=(^ newline)
|
||||
(weld (scag u.newline texp) " ...")
|
||||
:- (tr-chow wyd '#' ' ' texp)
|
||||
?~ res.sep ~
|
||||
=- [' ' (tr-chow (dec wyd) ' ' -)]~
|
||||
~(ram re (snag 0 `(list tank)`res.sep))
|
||||
|
Loading…
Reference in New Issue
Block a user