Socket
Socket
Sign inDemoInstall

@highlightjs/cdn-assets

Package Overview
Dependencies
0
Maintainers
4
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @highlightjs/cdn-assets

Syntax highlighting with language autodetection. (pre-compiled CDN assets)


Version published
Maintainers
4
Created

Changelog

Source

Version 10.4.0

A largish release with many improvements and fixes from quite a few different contributors. Enjoy!

Deprecations:

  • (chore) requireLanguage is deprecated.
    • Prefer getLanguage (with custom error handling) or built-time dependencies.
    • See Library API for more information.

Parser:

  • enh(parser) use negative look-ahead for beginKeywords support (#2813) [Josh Goebel][]
  • enh(grammars) allow classNameAliases for more complex grammars [Josh Goebel][]
  • fix(vue): Language name now appears in CSS class (#2807) [Michael Rush][]
  • (chore) Clean up all regexs to be UTF-8 compliant/ready (#2759) [Josh Goebel][]
  • enh(grammars) allow classNameAliases for more complex grammars [Josh Goebel][]

New Languages:

  • Added 3rd party Chapel grammar to SUPPORTED_LANGUAGES (#2806) [Brad Chamberlain][]
  • Added BBCode grammar to SUPPORTED_LANGUAGES (#2867) [Paul Reid][]
  • enh(javascript) Added node-repl for Node.js REPL sessions (#2792) [Marat Nagayev][]

Language Improvements:

  • enh(shell) Recognize prompts which contain tilde ~ (#2859) [Guillaume Grossetie][]
  • enh(shell) Add support for multiline commands with line continuation \ (#2861) [Guillaume Grossetie][]
  • enh(autodetect) Over 30+ improvements to auto-detect (#2745) [Josh Goebel][]
    • 4-5% improvement in auto-detect against large sample set
    • properties, angelscript, lsl, javascript, n1ql, ocaml, ruby
    • protobuf, hy, scheme, crystal, yaml, r, vbscript, groovy
    • python, java, php, lisp, matlab, clojure, csharp, css
  • fix(r) fixed keywords not properly spaced (#2852) [Josh Goebel][]
  • fix(javascript) fix potential catastrophic backtracking (#2852) [Josh Goebel][]
  • fix(livescript) fix potential catastrophic backtracking (#2852) [Josh Goebel][]
  • bug(xml) XML grammar was far too imprecise/fuzzy [Josh Goebel][]
  • enh(xml) Improve precision to prevent false auto-detect positives [Josh Goebel][]
  • fix(js/ts) Prevent for/while/if/switch from falsly matching as functions (#2803) [Josh Goebel][]
  • enh(julia) Update keyword lists for Julia 1.x (#2781) [Fredrik Ekre][]
  • enh(python) Match numeric literals per the language reference [Richard Gibson][]
  • enh(ruby) Match numeric literals per language documentation [Richard Gibson][]
  • enh(javascript) Match numeric literals per ECMA-262 spec [Richard Gibson][]
  • enh(java) Match numeric literals per Java Language Specification [Richard Gibson][]
  • enh(swift) Match numeric literals per language reference [Richard Gibson][]
  • enh(php) highlight variables (#2785) [Taufik Nurrohman][]
  • fix(python) Handle comments on decorators (#2804) [Jonathan Sharpe][]
  • enh(diff) improve highlighting of diff for git patches [Florian Bezdeka][]
  • fix(llvm) lots of small improvements and fixes (#2830) [Josh Goebel][]
  • enh(mathematica) Rework entire implementation [Patrick Scheibe][]
    • Correct matching of the many variations of Mathematica's numbers
    • Matching of named-characters aka special symbols like \[Gamma]
    • Updated list of version 12.1 built-in symbols
    • Matching of patterns, slots, message-names and braces
  • fix(swift) Handle keywords that start with # [Marcus Ortiz][]
  • enh(swift) Match some keyword [Marcus Ortiz][]
  • enh(swift) Match @main attribute [Marcus Ortiz][]

Dev Improvements:

  • chore(dev) add theme picker to the tools/developer tool (#2770) [Josh Goebel][]
  • fix(dev) the Vue.js plugin no longer throws an exception when hljs is not in the global namespace [Kyle Brown][]

New themes:

  • StackOverflow Dark by [Jan Pilzer][]
  • StackOverflow Light by [Jan Pilzer][]

Readme

Source

Highlight.js CDN Assets

install size

This package contains only the CDN build assets of highlight.js.

This may be what you want if you'd like to install the pre-built distributable highlight.js client-side assets via NPM. If you're wanting to use highlight.js mainly on the server-side you likely want the highlight.js package instead.

To access these files via CDN:
https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@latest/build/

If you just want a single .js file with the common languages built-in: https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@latest/build/highlight.min.js


Highlight.js

Highlight.js is a syntax highlighter written in JavaScript. It works in the browser as well as on the server. It works with pretty much any markup, doesn’t depend on any framework, and has automatic language detection.

If you'd like to read the full README:
https://github.com/highlightjs/highlight.js/blob/master/README.md

License

Highlight.js is released under the BSD License. See LICENSE file for details.

The official site for the library is at https://highlightjs.org/.

The Github project may be found at: https://github.com/highlightjs/highlight.js

Further in-depth documentation for the API and other topics is at http://highlightjs.readthedocs.io/.

Authors and contributors are listed in the AUTHORS.txt file.

Keywords

FAQs

Last updated on 18 Nov 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc