summaryrefslogtreecommitdiff
path: root/util/processOrg.tsx
diff options
context:
space:
mode:
authorHuynh Tan <[email protected]>2022-06-30 15:52:03 +0700
committerHuynh Tan <[email protected]>2022-06-30 15:52:03 +0700
commit11111bb49889feb1b00e6814d9d81e3e23409d7c (patch)
tree34abd3ac10a1112baaea318cf5e38eabe33acb0a /util/processOrg.tsx
parent94b543c1d28743f85bee2342609ff2019f7ec7d8 (diff)
Read useInheritance from emacs config
Diffstat (limited to 'util/processOrg.tsx')
-rw-r--r--util/processOrg.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/processOrg.tsx b/util/processOrg.tsx
index 611c039..ea868ee 100644
--- a/util/processOrg.tsx
+++ b/util/processOrg.tsx
@@ -50,6 +50,7 @@ export interface ProcessedOrgProps {
linksByNodeId: LinksByNodeId
macros: { [key: string]: string } | {}
attachDir: string
+ useInheritance: boolean
}
export const ProcessedOrg = (props: ProcessedOrgProps) => {
@@ -66,6 +67,7 @@ export const ProcessedOrg = (props: ProcessedOrgProps) => {
linksByNodeId,
macros,
attachDir,
+ useInheritance,
} = props
if (!previewNode || !linksByNodeId) {
@@ -77,7 +79,7 @@ export const ProcessedOrg = (props: ProcessedOrgProps) => {
.use(extractKeywords)
.use(attachments, {
idDir: attachDir || undefined,
- useInheritance: true,
+ useInheritance,
})
.use(uniorgSlug)
.use(uniorg2rehype, { useSections: true })
@@ -157,6 +159,7 @@ export const ProcessedOrg = (props: ProcessedOrgProps) => {
isWiki={isMarkdown}
macros={macros}
attachDir={attachDir}
+ useInheritance={useInheritance}
>
{children}
</PreviewLink>