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 generates different html content for the same markdown when get the cached token #138935

Merged
merged 1 commit into from Dec 14, 2021
Merged

Conversation

weartist
Copy link
Contributor

@weartist weartist commented Dec 12, 2021

fix generates different html content for the same markdown when get the cached token

This PR fixes #

Hi,I found start from the second time calling render, the id for the Introduction will appended by a number:

Markdown:

[abc](#abc)
# abc

first calling after is correct:

<h1 data-line="4" class="code-line" id="abc">abc</h1>

but second calling after, an error is beginning to occur:

<h1 data-line="4" class="code-line" id="abc-1">abc</h1>

Steps to Reproduce:

  1. Click the "Open preview to the side" button
  2. Switch back to md
  3. Click the "Open preview to the side" button again, and Click on the link titled "abc". The expected behavior is for the preview window to scroll down to the header titled "abc". It does not.

i fond this pr :#47537
so the number is to resolve differentiate same header, but In the case of a hit cache, it's wrong

i find other pr:f732547#diff-0cd672777508d358387063c50187200e7192fdd34946ae7c5a02b5430935d253
look like the same thing

fix generates different html content for the same markdown when get the cached token
@mjbvz mjbvz added this to the January 2022 milestone Dec 14, 2021
@mjbvz mjbvz merged commit 3abcabd into microsoft:main Dec 14, 2021
@mjbvz
Copy link
Contributor

mjbvz commented Dec 14, 2021

Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants