Skip to content

Commit

Permalink
Merge pull request #513 from wallin/fix-edge-on-ios
Browse files Browse the repository at this point in the history
Handle Edge on iOS with only major.minor.patch versions
  • Loading branch information
commenthol authored Sep 1, 2022
2 parents fabd8a6 + 43d6543 commit dc85ab2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ user_agent_parsers:
# Edge Mobile
- regex: 'Windows Phone .{0,200}(Edge)/(\d+)\.(\d+)'
family_replacement: 'Edge Mobile'
- regex: '(EdgiOS|EdgA)/(\d+)\.(\d+)\.(\d+)\.(\d+)'
- regex: '(EdgiOS|EdgA)/(\d+)\.(\d+)\.(\d+)(?:\.(\d+)|)'
family_replacement: 'Edge Mobile'

# Samsung Internet (based on Chrome, but lacking some features)
Expand Down
6 changes: 6 additions & 0 deletions tests/test_ua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6938,6 +6938,12 @@ test_cases:
minor: '5'
patch: '0'

- user_agent_string: 'Mozilla/5.0 (iPad; CPU OS 12_5_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 EdgiOS/46.3.26 Mobile/15E148 Safari/605.1.15'
family: 'Edge Mobile'
major: '46'
minor: '3'
patch: '26'

- user_agent_string: 'Mozilla/5.0 (Linux; Android 8.1.0; Pixel Build/OPM4.171019.021.D1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.109 Mobile Safari/537.36 EdgA/42.0.0.2057'
family: 'Edge Mobile'
major: '42'
Expand Down

0 comments on commit dc85ab2

Please sign in to comment.