Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed May 29, 2023
1 parent a852237 commit 22b294d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mkdocs/structure/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,19 +282,19 @@ def render(self, config: MkDocsConfig, files: Files) -> None:
if self.markdown is None:
raise RuntimeError("`markdown` field hasn't been set (via `read_source`)")

_relative_path_extension = _RelativePathExtension(self.file, files)
_extract_title_extension = _ExtractTitleExtension()
relative_path_extension = _RelativePathExtension(self.file, files)
extract_title_extension = _ExtractTitleExtension()
md = markdown.Markdown(
extensions=[
_relative_path_extension,
_extract_title_extension,
relative_path_extension,
extract_title_extension,
*config['markdown_extensions'],
],
extension_configs=config['mdx_configs'] or {},
)
self.content = md.convert(self.markdown)
self.toc = get_toc(getattr(md, 'toc_tokens', []))
self._title_from_render = _extract_title_extension.title
self._title_from_render = extract_title_extension.title


class _RelativePathTreeprocessor(markdown.treeprocessors.Treeprocessor):
Expand Down

0 comments on commit 22b294d

Please sign in to comment.