mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:39:12 +00:00
Normalize relative markdown links (#3190)
This commit is contained in:
parent
a688a237d7
commit
6e54cd8233
4 changed files with 4 additions and 14 deletions
|
@ -28,10 +28,6 @@ SECTIONS: list[Section] = [
|
|||
Section("Contributing", "contributing.md", generated=True),
|
||||
]
|
||||
|
||||
DOCUMENTATION_LINK: str = (
|
||||
"For more, see the [documentation](https://beta.ruff.rs/docs/)."
|
||||
)
|
||||
|
||||
FATHOM_SCRIPT: str = (
|
||||
'<script src="https://cdn.usefathom.com/script.js" data-site="DUAEBFLB" defer>'
|
||||
"</script>"
|
||||
|
@ -46,12 +42,6 @@ def main() -> None:
|
|||
with Path("README.md").open(encoding="utf8") as fp:
|
||||
content = fp.read()
|
||||
|
||||
# Remove the documentation link, since we're _in_ the docs.
|
||||
if DOCUMENTATION_LINK not in content:
|
||||
msg = "README.md is not in the expected format."
|
||||
raise ValueError(msg)
|
||||
content = content.replace(DOCUMENTATION_LINK, "")
|
||||
|
||||
# Convert any inter-documentation links to relative links.
|
||||
content = content.replace("https://beta.ruff.rs", "")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue