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 was archived by the owner on Dec 15, 2022. It is now read-only.
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
I'm using this package separately from Atom, for syntax highlighting code snippets in markdown files. I've noticed that when I switched from Highlight.js/Prism to Highlights, my page rendering performance reduced.
This appears to be due to the number of <span> elements Highlights generates. In addition to the ones that have class attributes with token names, there are also a lot of <span> elements generated which don't have any class attribute.
When I tried stripping just the classless <span> tags, the rendering performance was now instant again.
Prerequisites
Description
I'm using this package separately from Atom, for syntax highlighting code snippets in markdown files. I've noticed that when I switched from Highlight.js/Prism to Highlights, my page rendering performance reduced.
This appears to be due to the number of
<span>elements Highlights generates. In addition to the ones that haveclassattributes with token names, there are also a lot of<span>elements generated which don't have anyclassattribute.When I tried stripping just the classless
<span>tags, the rendering performance was now instant again.Steps to Reproduce
Expected behavior:
That highlighting produces only the tags that are necessary.
Actual behavior:
Highlighting produces many
<span>tags that are not needed (the script above produces 4 such tags).Versions
Highlights 3.1.4