mirror of
https://github.com/lancedikson/bowser
synced 2025-12-05 06:02:14 +00:00
Fix regex patterns to handle alpha/beta version suffixes
Co-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>
This commit is contained in:
parent
788e65fdee
commit
09c482046c
@ -290,7 +290,7 @@ const browsersList = [
|
|||||||
const browser = {
|
const browser = {
|
||||||
name: 'MSNBot',
|
name: 'MSNBot',
|
||||||
};
|
};
|
||||||
const version = Utils.getFirstMatch(/msnbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
const version = Utils.getFirstMatch(/msnbot\/(\d+(\.\d+)*[a-z]*)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
||||||
|
|
||||||
if (version) {
|
if (version) {
|
||||||
browser.version = version;
|
browser.version = version;
|
||||||
@ -307,7 +307,7 @@ const browsersList = [
|
|||||||
const browser = {
|
const browser = {
|
||||||
name: 'BingPreview',
|
name: 'BingPreview',
|
||||||
};
|
};
|
||||||
const version = Utils.getFirstMatch(/bingpreview\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
const version = Utils.getFirstMatch(/bingpreview\/(\d+(\.\d+)*[a-z]*)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
||||||
|
|
||||||
if (version) {
|
if (version) {
|
||||||
browser.version = version;
|
browser.version = version;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user