ID:2949365
 
Resolved
When maptext changed styles before a space and that space was gobbled up by a line break, the style change didn't carry over to the new line.
BYOND Version:515
Operating System:Windows 10 Home
Web Browser:Firefox 131.0
Applies to:Dream Seeker
Status: Resolved (515.1645)

This issue has been resolved.
Descriptive Problem Summary:

Maptext HTML tag parsing fails when a HTML tag would go onto a new line because of maptext width, and the tag being on the edge of a new line.

Numbered Steps to Reproduce Problem:
1. Apply maptext that has a HTML tag.
2. Adjust maptext_width until the tag would be caught by a line break.

Code Snippet (if applicable) to Reproduce Problem:
Demo link for convenience:
https://cdn.discordapp.com/attachments/329518903078420480/ 1297976673701986314/maptextlinkbug.zip?ex=6717e27a&is=671690 fa&hm=371404bfe0dff0c2c24c6e99596b480e0f6fc28194a0b8ec28f622 07fcf921cf&

mob/verb/broken_maptext_1()
usr.loc = locate(5,5,1)
var/obj/i = new(usr.loc)
i.maptext_height = 200
i.maptext_width = 50
i.maptext = "1234<u>hey</u>text <u>test2</u> hey632"


Expected Results:
No text not between the underline tags has an underline.
Actual Results:
The text outside of the tags has an underline.
Does the problem occur:
Every time? Or how often? Everytime when on an edge.
In other games? Yes.
In other user accounts? Yes.
On other computers? Yes.

When does the problem NOT occur?
Here, until you add a space between /u> and 1234.
mob/verb/correct_maptext()
usr.loc = locate(5,5,1)
var/obj/i = new(usr.loc)
i.maptext_height = 200
i.maptext_width = 21
i.maptext = "<u>test</u>1234"

mob/verb/broken_maptext_2()
usr.loc = locate(5,5,1)
var/obj/i = new(usr.loc)
i.maptext_height = 200
i.maptext_width = 21
i.maptext = "<u>test</u> 1234"

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.) No.

Workarounds: Don't end a html tag before a new line.

Lummox JR resolved issue with message:
When maptext changed styles before a space and that space was gobbled up by a line break, the style change didn't carry over to the new line.

Login to reply.