From c4d4aad3ecf6b6b4120595f956c9196eb52830d0 Mon Sep 17 00:00:00 2001 From: someguy126 Date: Mon, 8 Dec 2014 12:34:37 -0800 Subject: [PATCH] licenseGuess(): Add more robust checks for MIT-style licenses The MIT license is also known as the Expat or X11 license; the optional parentheses accomodate forms such as "MIT (Expat) license". This also adds a text match in case the name is not explicitly stated. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index f274e8d..21d1902 100644 --- a/server.js +++ b/server.js @@ -2874,7 +2874,7 @@ function guessLicense(text) { 'LGPLv2.1': 'gnu lesser general public license,? version 2\\.1', 'LGPLv3': 'gnu lesser general public license,? version 3', 'LGPL': 'gnu (library|lesser) general public license', - 'MIT': 'mit license', + 'MIT': '\\(?(mit|expat|x11)\\)? license|permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files', 'MPL 1.1': 'mozilla public license,? (\\(MPL\\) )?(version |v|v\\.)?1\\.1', 'MPL 2': 'mozilla public license,? (\\(MPL\\) )?(version |v|v\\.)?2', 'MPL': 'mozilla public license',