Skip to content

Removed dependency on $ from the highlighter

Denys Mishunov requested to merge dmishunov/highlighter-without-jquery into master

What does this MR do?

This is a unification of the syntax highlighter (used in GFM markup in particular) that allows the syntax highlighter to be used without jQuery. In particular, we now can:

  • pass jQuery nodes (original behavior)
  • a NodeList as a result of vanilla document.querySelectorAll()
  • a Node as a result of vanilla document.querySelector()

Also, this allows us to have one more module jquery-free.

Screenshots or Screencasts (strongly suggested)

No visual changes:

Before (master) After (this branch)
Screenshot_2021-08-09_at_16.54.10 Screenshot_2021-08-09_at_16.53.02

How to setup and validate locally (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Denys Mishunov

Merge request reports

Loading