Skip to content

Commit

Permalink
Changed links and filenames for standalone docs to be compatible with…
Browse files Browse the repository at this point in the history
… GH wiki
  • Loading branch information
Tiger-Tom committed Dec 7, 2023
1 parent e956c5e commit c9a8a2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions devel/makedoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ def _md_rs_heldclass(headl: str, heads: str, level: int, cls: type, long: str, s
try: p = Path(m.__file__).relative_to(Path.cwd())
except ValueError: pass
else: build.append(f'[`{p}`](/{p} "Source") ')
rp = f'parts/{headl.replace(".", "/")}/{long}.md'
build.append(f'[Standalone doc: {rp}](./{rp}) ')
rp = f'parts/{headl.replace(".", "/")}/{headl}.{long}.md'
build.append(f'[Standalone doc: {rp}]({headl}.{long}.md) ')
if (d := getattr(cls, '__doc__', None)) and ('no_docstr' not in pragma): build.append('\n'.join(md_docstr(d)))
#if d := getattr(getattr(cls, '__init__', None), '__doc__', None):
# build.append('\n'.join(md_docstr(d)))
Expand Down Expand Up @@ -248,7 +248,7 @@ def _md_rs_heldclass(headl: str, heads: str, level: int, cls: type, long: str, s
def md_rs_heldclass(headl: str, heads: str, level: int, cls: type, long: str, short: str | None = None, no_header: bool = False) -> str | None:
r = _md_rs_heldclass(headl, heads, level, cls, long, short, no_header)
if r is None: return None
rp = Path(f'parts/{headl.replace(".", "/")}/{long}.md')
rp = Path(f'parts/{headl.replace(".", "/")}/{headl}.{long}.md')
p = Path('docs/autodocs/', rp)
p.parent.mkdir(parents=True, exist_ok=True)
p.write_text(r if not level else _md_rs_heldclass(headl, heads, 0, cls, long, short, no_header))
Expand Down

0 comments on commit c9a8a2d

Please sign in to comment.