Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line Highlight: Fixed linkable line numbers not being initialized #2732

Merged

Conversation

RunDevelopment
Copy link
Member

When linkable line numbers were added for Line Highlight in #2328, I forgot to change the initialization logic.

This has now been fixed using the new isActiveFor function. Instead of a simple data-line attribute check, this function will now decide which elements get initialized. (This also has the nice side effect of removing some duplicate code.)

A duplicate id in line-highlight/index.html has also been fixed.


This fixes #2730.

@github-actions
Copy link

github-actions bot commented Jan 22, 2021

JS File Size Changes (gzipped)

A total of 2 files have changed, with a combined diff of -62 B (-1.9%).

file master pull size diff % diff
components/prism-php.min.js 1.86 KB 1.84 KB -21 B -1.1%
plugins/line-highlight/prism-line-highlight.min.js 1.48 KB 1.43 KB -41 B -2.8%

Generated by 🚫 dangerJS against 0c5d372

@RunDevelopment RunDevelopment merged commit ccc73ab into PrismJS:master Feb 7, 2021
@RunDevelopment RunDevelopment deleted the line-highlight-linkable-fix branch February 7, 2021 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] sth missing in line number plugin initialization process
1 participant