Skip to content

Commit 0f19dda

Browse files
committed
Escape stars.
1 parent 566c23b commit 0f19dda

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

python3/github-repo-summary.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
args = parser.parse_args()
1515
github = Github(os.getenv("GITHUB_TOKEN"))
1616

17+
def sanitize_for_md(s):
18+
s = s.replace("*","\*")
19+
return s
20+
1721
print(
1822
"Generated on {}, see the Markdown source of this file for more details.\n".format(
1923
time.strftime("%Y-%m-%d")
@@ -30,6 +34,6 @@
3034
content = " | ".join([
3135
"[{}]({})".format(r.full_name,r.html_url),
3236
str(r.stargazers_count),
33-
r.description
37+
sanitize_for_md(r.description)
3438
])
3539
print(content)

0 commit comments

Comments
 (0)