(#798) Add AnchorJS anchors to list items #799
Merged
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.
Description Of Changes
This adds anchors to list items that contain a
<strong>
or a<code>
node directly after an opening
<li>
tag. This is to make it easier tonavigate to these items, as often times this format is used more as a
"definition", or something we'd want to potentially link to.
No changes to current markdown is needed, as this intended to just
"work". All changes for this functionality live in choco-theme and will
be documented in the Choco Design System.
Motivation and Context
This feature came to mind while putting together the new Jargon page. It would be nice to be able to link others to specific list items that serve more as "definitions".
Testing
<code>
onto the url, so that it can be navigated to.<code>
item. The functionality should work the same as in the step above.<strong>
tag as the first item in the list. The functionality should be the same as in step 3.<code>
tag or a<strong>
tag get anchor links, and the anchor link should contain the text inside of said tag (not the entire contents of the list item itself).Change Types Made
Change Checklist
Related Issue