Modify ↓
Opened 6 years 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)
Note:
See TracTickets
for help on using tickets.