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

[BUG] Internal links to headers that contain code are broken #268

Open
ProtoxiDe22 opened this issue Jun 4, 2024 · 0 comments
Open

[BUG] Internal links to headers that contain code are broken #268

ProtoxiDe22 opened this issue Jun 4, 2024 · 0 comments

Comments

@ProtoxiDe22
Copy link

ProtoxiDe22 commented Jun 4, 2024

As per title, if creating an internal obsidian link to an headers that contains text enclosed in backticks, once published with digitalgarden, the link breaks.

suppose i have a file called programming.md , inside this file i have an heading such as this

## Using `String.format()`

in obsidian i can link to it like every other heading by just writing

[[programming#using `String.format()`|using `String.format()`]]

this link works fine in Obsidian, but doesn't work when publishing the site with digitalgarden.
I quickly found out that the HTML IDs of headings with code inside, have their backticks removed and substituted with the word "code" such that the heading from above converts to:

<h3 id="using-code-string-format-code" tabindex="-1">using <code>String.format()</code></h3>

that's obviously done to avoid breaking the HTML, but i suppose that's what throws off the page builder when creating links and generates this bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant