Improve regex for yard data detection
This commit is contained in:
1 parent
bf72b68d8a
commit
c58c6a1b7b
1 file changed
+1
-1
@@ -339,7 +339,7 @@ function drawTracks(bezierData){
|
||||
}else{
|
||||
trackNameCounting[bezierData.name]++;
|
||||
}
|
||||
let yardData = /\[(#)\]|\[(Y)\]_\[(.*?)\]_\[((.*?)-(.*?)-(.*?))\]/.exec(bezierData.name);
|
||||
let yardData = /\[(#)\]|\[(Y)\][_-]\[(.*?)\][_-]\[((.*?)[_-]*(.*?)[_-]*(.*?))\]/.exec(bezierData.name);
|
||||
if(yardData){
|
||||
if(yardData[1]){ // track is [#], thus in yard limits, but not a specific designated yard.
|
||||
bezierData.isYard = true;
|
||||
|
||||
Reference in new issue
Block a user