We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48cb3c9 commit 6e960c2Copy full SHA for 6e960c2
packages/xpath/src/lib/geo/Geotrace.ts
@@ -39,7 +39,10 @@ const collectLines = (geopoints: GeotracePoints): readonly GeotraceLine[] => {
39
export class Geotrace {
40
static fromEncodedGeotrace(encoded: string): Geotrace | null {
41
const geopoints = encoded
42
- .replace(/\s*;\s*$/, '')
+ .trim()
43
+ // Consistency with JavaRosa: any number of trailing semicolons are
44
+ // ignored, with any amount of whitespace between them.
45
+ .replace(/(\s*;)+$/, '')
46
.split(/\s*;\s*/)
47
.map((value) => {
48
return geopointCodec.decodeValue(value);
0 commit comments