mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2025-02-26 14:11:59 +01:00
Replaced regex with re in info plugin
This commit is contained in:
parent
396c493f47
commit
37162a57cd
@ -23,7 +23,7 @@ import json
|
||||
import logging
|
||||
import os
|
||||
import platform
|
||||
import regex
|
||||
import re
|
||||
import requests
|
||||
import site
|
||||
import sys
|
||||
@ -408,9 +408,8 @@ class InfoPlugin(BasePlugin[InfoConfig]):
|
||||
|
||||
# Resolve the path into POSIX format to match the patterns
|
||||
pattern_path = _resolve_pattern(abspath, return_path = True)
|
||||
|
||||
for pattern in self.exclusion_patterns:
|
||||
if regex.search(pattern, pattern_path):
|
||||
if re.search(pattern, pattern_path):
|
||||
log.debug(f"Excluded pattern '{pattern}': {abspath}")
|
||||
self.excluded_entries.append(f"{pattern} - {pattern_path}")
|
||||
return True
|
||||
|
@ -23,7 +23,7 @@ import json
|
||||
import logging
|
||||
import os
|
||||
import platform
|
||||
import regex
|
||||
import re
|
||||
import requests
|
||||
import site
|
||||
import sys
|
||||
@ -408,9 +408,8 @@ class InfoPlugin(BasePlugin[InfoConfig]):
|
||||
|
||||
# Resolve the path into POSIX format to match the patterns
|
||||
pattern_path = _resolve_pattern(abspath, return_path = True)
|
||||
|
||||
for pattern in self.exclusion_patterns:
|
||||
if regex.search(pattern, pattern_path):
|
||||
if re.search(pattern, pattern_path):
|
||||
log.debug(f"Excluded pattern '{pattern}': {abspath}")
|
||||
self.excluded_entries.append(f"{pattern} - {pattern_path}")
|
||||
return True
|
||||
|
Loading…
x
Reference in New Issue
Block a user