Modify

Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#17638 closed defect (invalid)

lit 24/7 in exclusion style string. josm error

Reported by: Allroads Owned by: team
Priority: normal Milestone:
Component: Core mappaint Version: tested
Keywords: mapcss Cc:

Description (last modified by Don-vip)

Josm gives a warning.
org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException: Encountered "" at line 1592, column 34.

line 1592:

way|z18-["highway"]["lit"]["lit"!~/^(yes|no|24/7|sunset-sunrise|automatic)$/]::highway_lit_layer { 

this |24/7| gives the problem error josm in the exclusion string

way|z18-["highway"]["lit"="yes"]::highway_lit_layer { 
repeat-image: highway-lit-yes.svg;
}       
way|z18-["highway"]["lit"="no"]::highway_lit_layer { 
repeat-image: highway-lit-no.svg;
}
way|z18-["highway"]["lit"="24/7"]::highway_lit_layer { 
repeat-image: highway-lit-247.svg;
}
way|z18-["highway"]["lit"="sunset-sunrise"]::highway_lit_layer { 
repeat-image: highway-lit-sunset-sunrise.svg;
}
way|z18-["highway"]["lit"="automatic"]::highway_lit_layer { 
repeat-image: highway-lit-automatic.svg;
}
/* Last lit tag Else. PROBLEM with 24/7 */
way|z18-["highway"]["lit"]["lit"!~/^(yes|no|24/7|sunset-sunrise|automatic)$/]::highway_lit_layer { 
repeat-image: highway-lit-else.svg;
}

The highway-lit-247.svg is visible. When I leave out last lit tag lines, to show else icon.

This works with the 24/7 and the " "

way|z18-["highway"]["lit"="24/7"]::highway_lit_layer { 
repeat-image: highway-lit-247.svg;

Attachments (0)

Change History (3)

comment:1 Changed 11 months ago by Don-vip

Description: modified (diff)

comment:2 Changed 11 months ago by Klumbumbus

Resolution: invalid
Status: newclosed

In ["lit"!~/^(yes|no|24/7|sunset-sunrise|automatic)$/] you use a regular expression. As the / character has a special function in regular expressions by default you need to define that in this case it should not use its special function but just take it as "normal" character which you can do by adding a \ before that character.
So you need to use ["lit"!~/^(yes|no|24\/7|sunset-sunrise|automatic)$/]

comment:3 Changed 11 months ago by Allroads

Thanks, it works.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.