From 431926d390b734cddda12266cea9df782d7150bd Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Sun, 18 Aug 2019 02:42:42 +1000
Subject: [PATCH] check_spelling: filter out URL's

---
 check_source/check_spelling.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/check_source/check_spelling.py b/check_source/check_spelling.py
index 3e3db6c..95b80d9 100755
--- a/check_source/check_spelling.py
+++ b/check_source/check_spelling.py
@@ -55,10 +55,15 @@ from check_spelling_c_config import (
 
 import re
 re_vars = re.compile("[A-Za-z]+")
+re_url = re.compile(r'(https?|ftp)://\S+')
 
 def words_from_text(text):
     """ Extract words to treat as English for spell checking.
     """
+
+    # Strip out URL's.
+    text = re_url.sub(" ", text)
+
     text = text.strip("#'\"")
     text = text.replace("/", " ")
     text = text.replace("-", " ")
-- 
GitLab