Skip to content
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

Wikilink does not display H1 or title: of linked note in rendered markdown #1320

Closed
mburleigh opened this issue Jan 11, 2024 · 4 comments
Closed
Labels
bug Something isn't working foam-vscode Foam for VSCode extension in packages/foam-vscode good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@mburleigh
Copy link

Describe the bug

Wikilinks are not displaying the H1 or frontmatter title: attribute in the rendered markdown. Linking to a note foo.md that has an H1 Foo Title (ex. [[foo]]) displays foo in the markdown preview, not Foo Title.

Small Reproducible Example

https://github.com/mburleigh/foam-wikilinks-titles

Steps to Reproduce the Bug or Issue

Preview the sample project

Expected behavior

I would expect the rendered markdown to show the H1 or the frontmatter title attribute.

Screenshots or Videos

image

Operating System Version

Windows 11

Visual Studio Code Version

1.85.1

Additional context

No response

@riccardoferretti riccardoferretti added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers foam-vscode Foam for VSCode extension in packages/foam-vscode labels Jan 12, 2024
@riccardoferretti riccardoferretti added this to the backlog milestone Jan 12, 2024
@mburleigh mburleigh changed the title Wikilink does not display H1 or title: of kinked note in rendered markdown Wikilink does not display H1 or title: of linked note in rendered markdown Jan 12, 2024
@mburleigh
Copy link
Author

@riccardoferretti - I have done some work on VS Code extensions in the past. If you can give me an idea of where in the codebase this bug might be I can take a look.

@riccardoferretti
Copy link
Collaborator

Thanks for looking into it, the code you are looking for is in wikilink-navigation.ts. Looking at the code it seems like it should already be doing the substitution, so likely there is some issue I am missing atm.

Let me know if you need additional pointers.

@mburleigh
Copy link
Author

Looks like it's a problem with the Markdown Preview Enhanced extension; this screenshot shows the source file, Markdown Preview Enhanced rendered version, and the regular Markdown Preview rendered version:

image

@riccardoferretti
Copy link
Collaborator

That sounds about right, we don't support Markdown Preview Enhanced. Foam supports the built-in md preview

@riccardoferretti riccardoferretti closed this as not planned Won't fix, can't repro, duplicate, stale Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working foam-vscode Foam for VSCode extension in packages/foam-vscode good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants