jackyzha0 / quartz

🌱 a fast, batteries-included static-site generator that transforms Markdown content into fully functional websites
https://quartz.jzhao.xyz
MIT License
6.82k stars 2.47k forks source link

Properly render wikilinks with backticks (`) #1246

Open christeefy opened 3 months ago

christeefy commented 3 months ago

Intro

First of all, I just wanna say thank you so much for the wonderful plugin! It's a huge deal for me who's not well versed with JS/TS but still want an Obsidian-flavoured markdown SSG. Keep up the great work!

Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I have some notes that contain the ` notation. This comes up when the note is regarding coding concepts that benefit from code formatting to distinguish the idea being highlighted.

For example, I may have a note like The Never ! Type. Without the code formatting, the title may be confusing to the reader.

The problem is that anytime a note contains the backtick notation, wikilink parsing fails. So instead of two notes getting properly linked, "[[The Never ! Type]]" is rendered instead.

Why I think this is important to fix:

Describe the solution you'd like

A clear and concise description of what you want to happen.

When a file contains the backtick, its corresponding wikilink in other files should be properly rendered in Quartz via hyperlink.

This should work for various wikilink cases including:

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

I looked through ofm.ts but wasn't successful at making the change as I'm not well-versed enough in JS/TS.

Additional context

Add any other context or screenshots about the feature request here.