]> git.r.bdr.sh - rbdr/map/blobdiff - Map/Logic/MapParser/Strategies/GroupParserStrategy.swift
Add search
[rbdr/map] / Map / Logic / MapParser / Strategies / GroupParserStrategy.swift
index ea5e0f373b1f1e21c88410ab5a11949cb9cb540c..d5ab60c5c8a218699878ccad3ea206597a7fa596 100644 (file)
@@ -32,8 +32,11 @@ struct GroupParserStrategy: MapParserStrategy {
     let match = matches[0]
     var groupVertices: [Vertex] = []
     let vertexIdString = String(line[Range(match.range(at: 2), in: line)!])
-    let vertexIds = vertexIdString.split(separator: " ", omittingEmptySubsequences: true).map(
-      String.init)
+    let vertexIds = vertexIdString.split(separator: ",", omittingEmptySubsequences: true).map(
+      String.init
+    ).map({ vertexId in
+      vertexId.trimmingCharacters(in: .whitespacesAndNewlines)
+    })
 
     for vertexId in vertexIds {
       if let vertex = vertices[vertexId] {