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

fix: clear title cache after rendering of a post #184

Merged
merged 2 commits into from Aug 27, 2022

Conversation

renbaoshuo
Copy link
Member

Problem

After #135, using the same heading in different posts caused the rendered posts' anchor id to be add unnecessarily suffixes.

Reproduction

_posts/post-1.md

---
title: Post 1
---

## Development

## Production

will be rendered to:

<h2 id="Development">Development</h2>
<h2 id="Production">Production</h2>

_posts/post-2.md

---
title: Post 2
---

## Development

## Production

will be rendered to:

<h2 id="Development-2">Development</h2>
<h2 id="Production-2">Production</h2>

actually the result should as same as _posts/post-1.md.

@SukkaW SukkaW merged commit 242bf09 into hexojs:master Aug 27, 2022
@renbaoshuo renbaoshuo deleted the fix-anchor-id branch August 27, 2022 10:53
@renbaoshuo
Copy link
Member Author

Should we release a new version after merge this PR?

@yoshinorin
Copy link
Member

Should we release a new version after merge this PR?

Ready #185

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

Successfully merging this pull request may close these issues.

None yet

3 participants