We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 232dc63 commit def0b15Copy full SHA for def0b15
jsondoc/utils/text_with_backref.py
@@ -10,9 +10,16 @@
10
11
class BackRef(BaseModel):
12
plain_text: str
13
- block_id: str
14
start_idx: int
15
end_idx: int
+ """
16
+ block_id must be set for most cases.
17
18
+ block_id: str | None = None
19
20
+ Used for content that do not belong to a block, e.g. page title.
21
22
+ page_id: str | None = None
23
24
25
class TextWithBackrefs(BaseModel):
@@ -71,7 +78,7 @@ def extract_text_with_backref_from_page(
71
78
backrefs.append(
72
79
BackRef(
73
80
plain_text=title_text,
74
- block_id=page.id,
81
+ page_id=page.id,
75
82
start_idx=start_idx,
76
83
end_idx=end_idx,
77
84
)
0 commit comments