Don't mark all lanes as designated when there are blank lane specifiers in the tag.
This commit is contained in:
parent
a933b5d949
commit
ceddfada3d
@ -170,6 +170,8 @@ Feature: Car - Restricted access
|
|||||||
| primary | | designated | | -1 | | x |
|
| primary | | designated | | -1 | | x |
|
||||||
| primary | | | designated | yes | | |
|
| primary | | | designated | yes | | |
|
||||||
| primary | | | designated | -1 | | |
|
| primary | | | designated | -1 | | |
|
||||||
|
| primary | | | designated\| | yes | x | |
|
||||||
|
| primary | | | designated\| | -1 | | x |
|
||||||
| primary | | | designated\|designated | yes | | |
|
| primary | | | designated\|designated | yes | | |
|
||||||
| primary | | | designated\|designated | -1 | | |
|
| primary | | | designated\|designated | -1 | | |
|
||||||
| primary | | | designated\|yes | yes | x | |
|
| primary | | | designated\|yes | yes | x | |
|
||||||
|
@ -261,7 +261,9 @@ function way_function (way, result)
|
|||||||
-- also respect user-preference for HOV-only ways when all lanes are HOV-designated
|
-- also respect user-preference for HOV-only ways when all lanes are HOV-designated
|
||||||
local function has_all_designated_hov_lanes(lanes)
|
local function has_all_designated_hov_lanes(lanes)
|
||||||
local all = true
|
local all = true
|
||||||
for lane in lanes:gmatch("(%w+)") do
|
-- This gmatch call effectively splits the string on | chars.
|
||||||
|
-- we append an extra | to the end so that we can match the final part
|
||||||
|
for lane in (lanes .. '|'):gmatch("([^|]*)|") do
|
||||||
if lane and lane ~= "designated" then
|
if lane and lane ~= "designated" then
|
||||||
all = false
|
all = false
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user