forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docs-infra): exclude heading anchor icon text from ToC tooltips (a…
…ngular#32418) The Table of Contents (ToC) is auto-generated based on the content of heading elements on the page. At the same time, anchor links are auto-generated and added to each heading element. Note that the Material Icons used for the anchor icon make use of ligatures, which means that the icons are specified by using their textual name as text content of the icon element. As a result, the name of the icon is included in the parent element's `textContent`. Previously, the `TocService` used to strip off these anchor elements when generating the content of ToC items, but not when generating the content of their tooltips. Thus, tooltips for ToC items would confusingly include a `link` suffix (`link` is the textual name of the icon used in heading anchor links). This commit fixes this by deriving the tooltip content from the transformed text content (which already has anchor links stripped off), instead of from the original heading content. PR Close angular#32418
- Loading branch information
Showing
2 changed files
with
44 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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