Skip to content

Commit

Permalink
improve wording on rationale and log messages
Browse files Browse the repository at this point in the history
com.google.fonts/check/description/urls on Google Fonts profile.

(issue fonttools#4283)
  • Loading branch information
felipesanches committed Sep 23, 2023
1 parent 956967d commit 1c5b603
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Lib/fontbakery/profiles/googlefonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def com_google_fonts_check_description_broken_links(description_html):
family webpage on the Google Fonts website.
Google Fonts has a content formatting policy for that snippet that expects the
text content of links not to include the http:// or https:// prefixes.
text content of anchors not to include the http:// or https:// prefixes.
""",
proposal=[
"https://github.com/fonttools/fontbakery/issues/3497",
Expand All @@ -354,16 +354,17 @@ def com_google_fonts_check_description_urls(description_html):
if a_href.attrib:
yield FAIL, Message(
"empty-link-text",
f"The following link has empty text:\n\n{a_href.attrib}\n",
"The following anchor has empty text content:\n\n"
f"{a_href.attrib}\n",
)
continue

if link_text.startswith("http://") or link_text.startswith("https://"):
passed = False
yield FAIL, Message(
"prefix-found",
f'Please remove the "http(s)://"'
f' prefix from the link text "{link_text}"',
'Please remove the "http(s)://" prefix from the text content'
f" of the following anchor:\n\n{link_text}",
)
continue

Expand Down

0 comments on commit 1c5b603

Please sign in to comment.