Update generate_readme.py
This commit is contained in:
parent
b55c8df426
commit
158e9072e4
|
|
@ -60,8 +60,10 @@ def remove_extra_parentheses(lines):
|
||||||
def add_awesome_badge(lines):
|
def add_awesome_badge(lines):
|
||||||
"""Ensure the Awesome badge is correctly added."""
|
"""Ensure the Awesome badge is correctly added."""
|
||||||
badge = '[](https://awesome.re)'
|
badge = '[](https://awesome.re)'
|
||||||
|
# Check if the badge already exists
|
||||||
if any(badge in line for line in lines):
|
if any(badge in line for line in lines):
|
||||||
return lines
|
return lines
|
||||||
|
# Add the badge at the top if not present
|
||||||
lines.insert(0, badge)
|
lines.insert(0, badge)
|
||||||
return lines
|
return lines
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue