RhostMUSH / trunk

RhostMUSH 4.0: This is the official main repository of RhostMUSH. Visit us at rhostdev.mushpark.com 4201
23 stars 21 forks source link

bug: wrap() not killing leading spaces before justifying text #137

Closed thenomain closed 11 months ago

thenomain commented 3 years ago
think wrap( this is a test of sorts that we want tested, 5, left )

this 
is a 
test 
of   
sorts
 that
 we  
want 
teste
d    

I would expect spaces to be culled on a per-line basis, so I think this is a bug.

Edit: Duh, version number!

RhostMUSH version 4.2.0-14 RL(A) #16 [04/25/2021]
thenomain commented 3 years ago

Changed issue title. Following spaces for right-justified text renders fine.

thenomain commented 3 years ago

Another odd example with wrap:

think wrap(this is an test, 5 )

this 
is   
an   
test 

Ignoring the grammar, is an is 5 characters and shouldn't be wrapping.

this 
is an
test 
mrsenile commented 3 years ago

Yea, this is more a design decision than a bug.

MUX's wrap() compresses spaces before each line, Rhost does not.

The issue is on: wrap(this is a test,4) this (1=t 2=h 3=i 4=s) is (1= 2=i 3=s 4=) a (1=a, 2-4=) test (1=t 2=e 3=s 4=t)

It keeps all spaces as literals from the string.
Not sure how to 'mimic' mux's wrap() with space compression after each line or even if we want that.

I'll leave that up to Ambrosia and others, but it explains what the differences are.

mrsenile commented 11 months ago

This seems reworked per https://github.com/RhostMUSH/trunk/commit/8a9dbf7b874f9646ea3c330ce7a37a7279cedecf

If this is still an issue, please open a new ticket.