Skip to content

Conversation

@Kalmaegi
Copy link
Contributor

@Kalmaegi Kalmaegi 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
Collaborator

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.

2 participants