The highlightjs Input Filter module adds an input filter which allows users to configure the text editor to highlight syntax using the highlight.js library.

The CKEditor CodeSnippet module provides this ability. However, that module is not being updated to Drupal 10, because most of the functionality is included with CKEditor 5. So, this module provides syntax highlighting. Furthermore, this module works without a dedicated code snippet button.

The Prism module is similar, but that uses the PrismJS library instead. The highlight.js library has the ability to automatically detect the code language used within code tags if one is not specified.

There is a D7 highlightjs module that I considered updating. However, that module maintainer plans to rewrite that module to provide the syntax highlighting using a specific field, not an input filter.

Project link

https://www.drupal.org/project/highlightjs_input_filter

Comments

nmangold created an issue. See original summary.

vishal.kadam’s picture

Thank you for applying! Reviewers will review the project files, describing what needs to be changed.

Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.

To reviewers: Please read How to review security advisory coverage applications, What to cover in an application review, and Drupal.org security advisory coverage application workflow.

While this application is open, only the user who opened the application can make commits to the project used for the application.

Reviewers only describe what needs to be changed; they don't provide patches to fix what reported in a review.

vishal.kadam’s picture

Issue summary: View changes
vishal.kadam’s picture

Status: Needs review » Needs work

1. Fix phpcs issue.

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml highlightjs_input_filter/

FILE: highlightjs_input_filter/README.md
------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------
 5 | WARNING | Line exceeds 80 characters; contains 111 characters
------------------------------------------------------------------------

2. FILE: highlightjs_input_filter.info.yml

package: custom

Modules should avoid using this value for the package.

3. README.md file is missing a few required sections.

Please take a moment to make your README.md follow the guidelines.

vishal.kadam’s picture

Usually, after reviewing a project, we allow the developer to opt projects into security advisory coverage.

This project is too small for us and it doesn't contain enough PHP code to really assess your skills as a developer.

Have you made any other contributions that we could instead review?

avpaderno’s picture

Issue summary: View changes

To make the previous comment clearer: This application can continue only with another project.

avpaderno’s picture

Priority: Normal » Minor
vinaymahale’s picture

Issue summary: View changes
avpaderno’s picture

Issue summary: View changes
nmangold’s picture

Status: Needs work » Needs review

I have added more features to this module, including a module settings form, route, menu item. Also, the module is dynamically loading assets to optimize page load times.

Is this enough changes to consider? If not, please give me an example of the minimum amount of code to consider being approved.

vinaymahale’s picture

Priority: Minor » Major
avpaderno’s picture

Assigned: Unassigned » avpaderno
Priority: Major » Normal
Status: Needs review » Reviewed & tested by the community

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the Slack #contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the reviewers.

avpaderno’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.