A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/nedbat/coveragepy/commit/0aa1070a2c9a99e10b7790b9a6a40a631ba5514e below:

links. · nedbat/coveragepy@0aa1070 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+9

-0

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+9

-0

lines changed Original file line number Diff line number Diff line change

@@ -84,6 +84,14 @@ def refind(regex, text):

84 84

else:

85 85

return None

86 86 87 + 88 +

def fix_ref_links(text, version):

89 +

"""Find links to .rst files, and make them full RTFD links."""

90 +

def new_link(m):

91 +

return f"](https://coverage.readthedocs.io/en/{version}/{m[1]}.html{m[2]})"

92 +

return re.sub(r"\]\((\w+)\.rst(#.*?)\)", new_link, text)

93 + 94 + 87 95

def relnotes(mdlines):

88 96

r"""Yield (version, text) pairs from markdown lines.

89 97

@@ -97,6 +105,7 @@ def relnotes(mdlines):

97 105

if version:

98 106

prerelease = any(c in version for c in "abc")

99 107

when = refind(r"\d+-\d+-\d+", htext)

108 +

text = fix_ref_links(text, version)

100 109

yield {

101 110

"version": version,

102 111

"text": text,

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4