Modify

Opened 2 months ago

#17189 new defect

mapcss should be able to use previous fields in the selector in additional fields

Reported by: taylor.smock Owned by: team
Priority: normal Milestone:
Component: Core mappaint Version: latest
Keywords: mapcss Cc:

Description

Example:

/* Check for duplicated words in names */
*[/^name/][regexp_test("\\b(\\p{L}+)\\b(?:\\s+\\1\\b)+", tag("{0.key}"), "(?i)")] {
  throwWarning: tr("Possible duplicated words in {0}", "{0.key}");
  assertMatch: "node name=\"Duplicate Duplicate\"";
  assertNoMatch: "node name=\"Nothing to see here\"";
}

instead of

*[/^name/][regexp_test("\\b(\\p{L}+)\\b(?:\\s+\\1\\b)+", tag("name"), "(?i)")] {
  throwWarning: tr("Possible duplicated words in {0}", "{0.key}");
}

Note:

*[/^name/][/^name/=~/(?i)\b(\p{L}+)\b(?:\s+\1\b)+/] {
  throwWarning: tr("Possible duplicated words in {0}", "{0.key}");
}

throws an error on the first +.

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to taylor.smock
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.