Skip to content

Commit

Permalink
PB-801: Allow all possible quotes style in coordinate extractor
Browse files Browse the repository at this point in the history
There are many quotes style that a user might use to enter a coordinate in
the search bar, a user used the following coordinates that did not worked

47°09′43″ N 7°40′33″E

So added all possible quotes styles to the regex.
  • Loading branch information
ltshb committed Jul 16, 2024
1 parent 4d2996c commit 342e6ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/coordinates/coordinateExtractors.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { toPoint as mgrsToWGS84 } from '@/utils/militaryGridProjection'

const RE_DEGREE_IDENTIFIER = '\\s*°\\s*'
const RE_DEGREE = `\\d{1,3}(\\.\\d+)?`
const RE_MIN_IDENTIFIER = "\\s*[']\\s*"
const RE_MIN_IDENTIFIER = "\\s*['‘’‛′]\\s*"
const RE_MIN = `\\d{1,2}(\\.\\d+)?`
const RE_SEC_IDENTIFIER = '\\s*("|[\']{2})\\s*'
const RE_SEC_IDENTIFIER = '\\s*(["“”‟″]|[\'‘’‛′]{2})\\s*'
const RE_SEC = `\\d{1,2}(\\.\\d+)?`
const RE_CARD = '[NSEW]'
const RE_SEPARATOR = '\\s*?[ \\t,/]\\s*'
Expand Down

0 comments on commit 342e6ab

Please sign in to comment.