jackyzha0 / quartz

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

Link to heading with dot is incorrect #318

Closed somidad closed 1 year ago

somidad commented 1 year ago

Describe the bug

If a note has a heading with dot(s) in it, a link to that heading is incorrect

To Reproduce Steps to reproduce the behavior:

  1. Create a note note1 and add a heading, e.g. # Clause X.Y.Z Hello
  2. Create another note and add a link to that heading, e.g. [[note1#Clause X.Y.Z Hello]]
  3. Publish
  4. See ID of HTML element of the heading is clause-xyz-hello
  5. See linked URL is note1#clause-x.y.z-hello

Expected behavior Two options:

  1. ID of HTML element preserves dots; or
  2. Dots in linked URL are removed

Desktop (please complete the following information):

somidad commented 1 year ago

I am using the following script for preprocessing:

https://github.com/somidad/telecom/blob/telecom/.github/workflows/remove-dot-from-fragment.js

jackyzha0 commented 1 year ago

This issue should be fixed in Quartz 4. I'll be closing it for now but please reopen this issue if this persists in the new version.