ele828 / hexo-prism-plugin

Hexo plugin for code highlighting by prism.js, supporting JSX syntax
205 stars 51 forks source link

Fix page.excerpt highlight issue #45

Closed Snowgan closed 6 years ago

Snowgan commented 6 years ago

Hexo filter type 'after_post_render' have registered 'excerpt.js' filter by default which will generate page.excerpt and page.more variables. As default highlight is disabled, these two variables cannot be highlighted correctly. So set PrismPlugin priority to make sure it executed first, and then execute the 'excerpt.js' filter.

ele828 commented 6 years ago

It's a good improvement and this pr looks good to me, thanks for your contribution! 👍

Snowgan commented 6 years ago

Thanks for acceptance! This tool is very helpful.