diff --git a/Lib/fontbakery/reporters/ghmarkdown.py b/Lib/fontbakery/reporters/ghmarkdown.py index 422e270b6b..b714c18752 100644 --- a/Lib/fontbakery/reporters/ghmarkdown.py +++ b/Lib/fontbakery/reporters/ghmarkdown.py @@ -40,6 +40,27 @@ def template(self, data): else: key = "Family checks" + module_parts = check["module"].split(".") + if module_parts[0] == "vendorspecific": + module = module_parts[1] + elif module_parts[0] == "opentype": + module = "opentype" + else: + module = "universal" + + check["id"] = check["key"][1].split(":")[1] + check["id"] = check["id"].split(">")[0] + check_id = check["id"].replace("_", "-") + check_id = check_id.replace("/", "-") + check_id = check_id.replace(".", "-") + + check["doc_url"] = ( + f"https://fontbakery.readthedocs.io/en/" + f"stable/fontbakery/checks/" + f"{module}.html#" + f"{check_id}" + ) + if check["result"] == "FATAL": # These will be reported at the very top. if key not in fatal_checks: diff --git a/Lib/fontbakery/reporters/templates/markdown/check.markdown b/Lib/fontbakery/reporters/templates/markdown/check.markdown index a830fd27c5..f41f201040 100644 --- a/Lib/fontbakery/reporters/templates/markdown/check.markdown +++ b/Lib/fontbakery/reporters/templates/markdown/check.markdown @@ -1,5 +1,5 @@
- {{check.result | emoticon}} {{check.result}} {{check.description}} {{check.id}} + {{check.result | emoticon}} {{check.result}} {{check.description}} {{check.id}}
{% if not succinct and check.rationale %}