diff --git a/cq-prolyfill.js b/cq-prolyfill.js
index <HASH>..<HASH> 100644
--- a/cq-prolyfill.js
+++ b/cq-prolyfill.js
@@ -1064,7 +1064,7 @@ function getSpecificity(selector) {
 			classScore++;
 			return '';
 		})
-		.replace(PSEUDO_NOT_REGEXP, '')
+		.replace(PSEUDO_NOT_REGEXP, ' ')
 		.replace(ID_REGEXP, function() {
 			idScore++;
 			return '';
diff --git a/tests.js b/tests.js
index <HASH>..<HASH> 100644
--- a/tests.js
+++ b/tests.js
@@ -666,6 +666,7 @@ QUnit.test('getSpecificity', function(assert) {
 		['[foo="bar"]', 256, 'attribute'],
 		['.\\:container\\(width\\<\\=1px\\)', 256, 'escaped container query'],
 		['.:container(width<=1px)', 256, 'unescaped container query'],
+		['foo:not(bar)', 2, 'negation pseudo-class'],
 	];
 
 	data.forEach(function(item) {
Fix bug with specificity of negation pseudo-class