Modify

Opened 5 years ago

Closed 5 years ago

#18408 closed enhancement (fixed)

[PATCH] There should be a method to trim lists of strings

Reported by: taylor.smock Owned by: Don-vip
Priority: normal Milestone: 19.12
Component: Core Version:
Keywords: mapcss Cc:

Description

Specific use case::

*["ref"] {
    color: hsb_color(CRC32_checksum(join_list(";", trim_list(sort_list(split(";", tag("ref")))))) / 4294967296, 0.9, 0.7);
}

If there are spaces in the ref tag, then A1; A2 does not have the same color as A2; A1.

Attachments (2)

18408.patch (1.9 KB ) - added by taylor.smock 5 years ago.
Add trim_list with test
18408.1.patch (1.9 KB ) - added by taylor.smock 5 years ago.
Patch from a less modified JOSM directory

Download all attachments as: .zip

Change History (6)

by taylor.smock, 5 years ago

Attachment: 18408.patch added

Add trim_list with test

comment:1 by Don-vip, 5 years ago

The patch doesn't apply nicely?

comment:2 by Don-vip, 5 years ago

Milestone: 19.12
Owner: changed from team to Don-vip
Status: newassigned

by taylor.smock, 5 years ago

Attachment: 18408.1.patch added

Patch from a less modified JOSM directory

in reply to:  1 comment:3 by taylor.smock, 5 years ago

Replying to Don-vip:

The patch doesn't apply nicely?

That is odd. It applied nicely in my josm-clean directory. I've uploaded the patch again, generated from my "clean" JOSM source directory, just in case. (I edited the first patch, which also stripped some white space, since my working directory has additional modifications, in this case Functions.java also has parent_tags function, which looks like I was trying to filter the returned tags based off of other tags, and it looks like I never finished it).

Last edited 5 years ago by taylor.smock (previous) (diff)

comment:4 by Don-vip, 5 years ago

Resolution: fixed
Status: assignedclosed

In 15591/josm:

fix #18408 - Add trim_list mapCSS function (patch by taylor.smock)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.