Skip to content

Commit

Permalink
notebook: Notebook.get_page(): Cross-reference page to owning notebook.
Browse files Browse the repository at this point in the history
This allows page to know filesystem layout and gazillion of other things.
Specific motivation for adding this is to allow generate/resolve
filesystem-based inter-page links for Markdown format.

Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
  • Loading branch information
pfalcon committed May 8, 2021
1 parent 8330965 commit 1457d33
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions zim/notebook/notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ def get_page(self, path):
folder = self.layout.get_attachments_folder(path)
format = self.layout.get_format(file)
page = Page(path, False, file, folder, format)
page.notebook = self
try:
indexpath = self.pages.lookup_by_pagename(path)
except IndexNotFoundError:
Expand Down

0 comments on commit 1457d33

Please sign in to comment.