-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transcluding nest callouts doesn't work #967
Comments
Can you put the file contents as a code block instead of a file? Thanks |
transclude_1> [!NOTE] Title
> - 1231231 ^2emjcu
> [!NOTE] list
> - 1
> - 2
> - 3
> ^m9oxui
> [!NOTE] t1
> in t1
> > [!NOTE] t2
> > in t2 ^fdxers transclude_2![[transclude_1#^2emjcu]]
![[transclude_1#^m9oxui]]
![[transclude_1#^fdxers]] |
Relevant code:quartz/quartz/components/renderPage.tsx Lines 78 to 104 in 0ca8a2a
quartz/quartz/plugins/transformers/ofm.ts Lines 154 to 163 in 0ca8a2a
quartz/quartz/plugins/transformers/ofm.ts Lines 382 to 471 in 0ca8a2a
quartz/quartz/plugins/transformers/ofm.ts Lines 625 to 631 in 0ca8a2a
Current problem:I suspect the parser sees a This is how the provided example (#967 (comment)) looks in Obsidian: The default Obsidian behavior seems to be to include the entire callout as a transcluded One option could be to 'lift' the reference to include the entire callout it is contained in. By default, Obsidian handles the callout as a single block, as if a reference exists in a nested callout, it will use that one instead of creating a new one. This means if we try to insert a transcluded link to > [!NOTE] t1
> in t1
> > [!NOTE] t2
> > in t2 ^fdxers Possible solution:Check for block-refs inside callouts. If a block-ref exists inside a callout, consider the entire callout as that block-ref for the purpose of linking/transcluding. The two most direct approaches would be either:
@jackyzha0 Do you have a particular preference for one of the two above, of perhaps any other insights I should take into consideration when implementing a fix for this issue? |
hope to be merged |
Describe the bug
When I embed block of complex callout , It don't render as same as in obsidian. See Screenshots and Source .
I use latest v4 branch , pulled minutes ago.
To Reproduce
transclude_1.md
is source notestransclude_2.md
ref blocks intransclude_1.md
transclude_1.md
transclude_2.md
Expected behavior
[!NOTE] title
Screenshots and Source
This is current view in local:8080,
Desktop (please complete the following information):
node
Version: [e.g. v18.16]npm
version: [e.g. v10.1.0]The text was updated successfully, but these errors were encountered: