Skip to content

Commit

Permalink
Fixing wp plugin version check (#1420)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazet authored Nov 28, 2024
1 parent 46ca1d6 commit f04f9d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions artemis/modules/wordpress_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"login-logo",
"mask-form-elementor",
"page-or-post-clone",
"pdf-poster",
"rafflepress",
"skyboot-custom-icons-for-elementor",
"sticky-header-effects-for-elementor",
Expand Down Expand Up @@ -157,8 +156,9 @@ def get_version_from_readme(slug: str, readme_content: str) -> Optional[str]:
# let's take only first 25 characters as the "version" word may occur in a middle of a sentence
if "version" in line[:25]:
line = line[line.find("version") + len("version") :].strip(" :")
# Some changelog entries have the format V <version>
if "v " in line:
# Some changelog entries have the format V <version> - let's match them but with word-boundary matcher
# so that we don't match "nov"
if re.search(r"\bv ", line):
line = line[line.find("v ") + len("v ") :].strip(" :")
if line.startswith("v"):
line = line[1:]
Expand Down

0 comments on commit f04f9d4

Please sign in to comment.