Closed
Conversation
This reverts commit bf0517c.
Co-authored-by: Nik Tsekouras <ntsekouras@outlook.com>
Co-authored-by: Nik Tsekouras <ntsekouras@outlook.com>
…' into add/autogenerate-heading-anchors
|
Size Change: +1.12 kB (0%) Total Size: 1.49 MB
ℹ️ View Unchanged
|
Contributor
|
I don't think this is the right approach because the flag indicating whether the anchor was edited manually is lost when the editor is reloaded (save and reload). I think using a prefix like @aristath suggested might be the simplest way for now without introducing a dedicated attribute. |
Contributor
|
After discussing more with @ntsekouras it seems we could approximate the flag by checking that |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is just an exploration for:#30825
The logic is that we should auto generate anchors when:
When we change manually the
anchorfrom the sidebar input it should allow it and not change it again from content change (autogeneration).The problem I have here is that the
autoGenstate variable is updated after a manual change, after the next render due to the async running and therefore it misses the first change. So if we manually change theanchorthe first character is missed but it works as intended from the second change :).Of course this is wrong but I'd like some input, if any for the proper approach here... @youknowriad , @ellatrix .