diff --git a/src/blurb/blurb.py b/src/blurb/blurb.py index b3998b5..86b3f55 100755 --- a/src/blurb/blurb.py +++ b/src/blurb/blurb.py @@ -399,7 +399,7 @@ class BlurbError(RuntimeError): (This formatting will be inserted when rendering the final output.) * Lines longer than 76 characters will be wordwrapped. * In the final output, the first line will have - "- gh-issue-: " inserted at the front, + "- :gh:``: " inserted at the front, and subsequent lines will have two spaces inserted at the front. @@ -989,13 +989,6 @@ def print(*a, sep=" "): s = sep.join(str(x) for x in a) return builtins.print(s, file=buff) - print (""" -+++++++++++ -Python News -+++++++++++ - -""".strip()) - for version in versions: filenames = glob_blurbs(version) @@ -1013,7 +1006,7 @@ def print(*a, sep=" "): assert len(filenames) == 1 blurbs.load(filenames[0]) - header = "What's New in Python " + printable_version(version) + "?" + header = printable_version(version) print() print(header) print("=" * len(header)) @@ -1042,14 +1035,13 @@ def print(*a, sep=" "): if metadata.get("gh-issue"): issue_number = metadata['gh-issue'] if int(issue_number): - body = "gh-" + issue_number + ": " + body + body = f":gh:`{issue_number}`: {body}" elif metadata.get("bpo"): issue_number = metadata['bpo'] if int(issue_number): - body = "bpo-" + issue_number + ": " + body + body = f":issue:`{issue_number}`: {body}" - body = "- " + body - text = textwrap_body(body, subsequent_indent=' ') + text = textwrap_body(f"- {body}", subsequent_indent=' ') print(text) print() print("**(For information about older versions, consult the HISTORY file.)**")