mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 20:04:09 +03:00
zuse: fix +cite for odd-length names
Render `@p` shorthands correctly for short moon names. Fixes #5318. This also changes galaxy and star moons to render as `~parent^` instead of some longer variation.
This commit is contained in:
parent
1a784cdeb7
commit
260c75f05d
@ -4910,13 +4910,20 @@
|
||||
++ cite :: render ship
|
||||
|= who=@p
|
||||
^- tape
|
||||
=+ kind=(clan who)
|
||||
=+ name=(scow %p who)
|
||||
?: =(%earl kind)
|
||||
:(weld "~" (swag [15 6] name) "^" (swag [22 6] name))
|
||||
?: =(%pawn kind)
|
||||
:(weld (swag [0 7] name) "_" (swag [51 6] name))
|
||||
name
|
||||
=/ wid (met 4 who)
|
||||
?: (lte wid 2) (scow %p who)
|
||||
?: (lte wid 4)
|
||||
=/ nom (scow %p (end 5 who))
|
||||
:(weld (scag 7 nom) "^" (slag 8 nom))
|
||||
%- trip
|
||||
%+ rap 3
|
||||
:~ '~'
|
||||
(tos:po (end 3 (rsh 3^(dec (mul wid 2)) who)))
|
||||
(tod:po (end 3 (rsh 3^(mul (dec wid) 2) who)))
|
||||
'_'
|
||||
(tos:po (end 3 (rsh 3 who)))
|
||||
(tod:po (end 3 who))
|
||||
==
|
||||
:: :: ++saxo:title
|
||||
++ saxo :: autocanon
|
||||
|= [our=ship now=@da who=ship]
|
||||
|
Loading…
Reference in New Issue
Block a user