jackyzha0 / quartz

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

Tag escape does not work #1542

Open exodrifter opened 1 month ago

exodrifter commented 1 month ago

Describe the bug Quartz does not escape tags, while Obsidian does.

To Reproduce

Steps to reproduce the behavior:

  1. Make a new note with a tag containing the text \#foobar
  2. Generate the static site
  3. Visit the note to see that the tag #foobar has been added to the page and the text #foobar in the body is now a link to the tag page.

Expected behavior

Quartz should not add the tag #foobar and render #foobar in the body of the note without a link

Screenshots and Source

Obsidian-Flavored Markdown:

# \#foobar

\#foobar is a popular tag used on bird site.

Obsidian:

image

Quartz:

image

Desktop (please complete the following information):

Additional context

This feature is mentioned in the official documentation:

In some cases, you may need to display special characters in Markdown, such as *, _, or #, without triggering their formatting. To display these characters literally, place a backslash (\) before them.

See: https://help.obsidian.md/Editing+and+formatting/Basic+formatting+syntax#Escaping+Markdown+Syntax

I imagine that this is probably related to #1496