Skip to content

Conversation

@RubenKelevra
Copy link
Contributor

Replace(' ', ' ') was replacing regular spaces with regular spaces.
Changed to replace(' ', '\u00A0') so it exchanges spaces to correct non-breaking space character.

Replace(' ', ' ') was replacing regular spaces with regular spaces.
Changed to replace(' ', '\u00A0') so it exchanges spaces to correct non-breaking space character.
@westnordost
Copy link
Member

Are you sure? Maybe the no break space was just not displaying? But, no matter, your change makes it clearer regardless

@westnordost westnordost merged commit 6bb2fbd into streetcomplete:master Jun 6, 2025
@RubenKelevra
Copy link
Contributor Author

Yeah I'm sure:

hexdump -C app/src/androidMain/kotlin/de/westnordost/streetcomplete/util/NameAndLocationLabel.kt | grep -A2 -B2 "replace"
00001e30  66 75 6e 20 53 74 72 69  6e 67 2e 69 6e 49 74 61  |fun String.inIta|
00001e40  6c 69 63 73 28 29 3a 20  53 74 72 69 6e 67 20 3d  |lics(): String =|
00001e50  20 22 3c 69 3e 24 7b 72  65 70 6c 61 63 65 48 74  | "<i>${replaceHt|
00001e60  6d 6c 45 6e 74 69 74 69  65 73 28 29 7d 3c 2f 69  |mlEntities()}</i|
00001e70  3e 22 0a 0a 70 72 69 76  61 74 65 20 66 75 6e 20  |>"..private fun |
00001e80  53 74 72 69 6e 67 2e 77  69 74 68 4e 6f 6e 42 72  |String.withNonBr|
00001e90  65 61 6b 69 6e 67 53 70  61 63 65 73 28 29 3a 20  |eakingSpaces(): |
00001ea0  53 74 72 69 6e 67 20 3d  20 72 65 70 6c 61 63 65  |String = replace|
00001eb0  28 27 20 27 2c 20 27 20  27 29 0a                 |(' ', ' ').|
00001ebb

westnordost added a commit that referenced this pull request Jun 8, 2025
matkoniecz pushed a commit to matkoniecz/Zazolc that referenced this pull request Jun 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants