Skip to content

Commit

Permalink
[#136] Fixing detection error for Lumia
Browse files Browse the repository at this point in the history
  • Loading branch information
commenthol committed Jun 7, 2017
1 parent 81e86a5 commit 2aa93b0
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 @@ -4264,7 +4264,7 @@ device_parsers:
#########
# Noka Windows Phones
#########
- regex: 'Windows Phone [^;]+; .*?IEMobile/[^;\)]+[;\)] ?(?:ARM; ?Touch; ?|Touch; ?)?(?:NOKIA|Nokia)[^;]*; *(?:NOKIA ?|Nokia ?|LUMIA ?|[Ll]umia ?)*(\d{3,}[^;\)]*)'
- regex: 'Windows Phone [^;]+; .*?IEMobile/[^;\)]+[;\)] ?(?:ARM; ?Touch; ?|Touch; ?)?(?:rv:11; )?(?:NOKIA|Nokia)[^;]*; *(?:NOKIA ?|Nokia ?|LUMIA ?|[Ll]umia ?)*(\d{3,}[^;\)]*)'
device_replacement: 'Lumia $1'
brand_replacement: 'Nokia'
model_replacement: 'Lumia $1'
Expand Down
6 changes: 6 additions & 0 deletions tests/test_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79989,3 +79989,9 @@ test_cases:
family: 'Spider'
brand: 'Spider'
model: 'Desktop'

- user_agent_string: 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; rv:11; NOKIA; Lumia 920) like Gecko'
family: 'Lumia 920'
brand: 'Nokia'
model: 'Lumia 920'

0 comments on commit 2aa93b0

Please sign in to comment.