You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.
Change #26 added the lang tag to pre nodes to indicate the programming language in use. However, the HTML spec says the lang tag should only be used for natural languages and not computer languages. Chrome's Lighthouse tool also flags the elements as having invalid (i.e. not BCP 47) tags.
There's additional discussion here about what the right approach is to include this data, which generally boil down to using class or data tags.
You may want to favor matching the CommonMark and Prism pattern of adding class="language-foo" to the code tag as a starting point.
Describe the bug
Change #26 added the lang tag to pre nodes to indicate the programming language in use. However, the HTML spec says the lang tag should only be used for natural languages and not computer languages. Chrome's Lighthouse tool also flags the elements as having invalid (i.e. not BCP 47) tags.
There's additional discussion here about what the right approach is to include this data, which generally boil down to using class or data tags.
You may want to favor matching the CommonMark and Prism pattern of adding
class="language-foo"
to the code tag as a starting point.Reproduction
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: