diff --git a/check_source/check_spelling.py b/check_source/check_spelling.py index 3e3db6c63d1e80bd7bd195d48fec25b8b21991c5..95b80d986c278b63026f7f8cf18b2bf0430ac6df 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("-", " ")