Socket
Socket
Sign inDemoInstall

@highlightjs/cdn-assets

Package Overview
Dependencies
0
Maintainers
5
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
Weekly downloads
49K
increased by2.28%
Maintainers
5
Install size
1.45 MB
Created
Weekly downloads
 

Changelog

Source

Version 10.5.0

Build:

  • Add Subresource Integrity digest lists to cdn-assets [Josh Goebel][]
  • R and VB.net grammars now ship in our default build (:common) [Josh Goebel][]

Parser:

  • add match as sugar for simple begin only matches (#2834) [Josh Goebel][]
  • allow illegal to also be an array of regex (#2834) [Josh Goebel][]
  • add compilerExtensions allows grammers to influence mode compilation (#2834) [Josh Goebel][]
    • some internal pieces are now simple compiler extensions

New Languages:

  • Added 3rd party Red & Rebol grammar to SUPPORTED_LANGUAGES (#2872) [Oldes Huhuman][]

Language grammar improvements:

  • enh: CSS grammars now share common foundation, keywords, etc. (#2937) [Josh Goebel][]
    • enh(css): many consistency improvements
    • enh(scss): many consistency improvements
    • enh(stylus): many consistency improvements
    • enh(less): many consistency improvements
  • enh(cpp): Support C++ pack expansion in function arguments [Martin Dørum][]
  • enh(makefile): Add make as an alias (#2883) [tripleee][]
  • enh(swift) Improved grammar for strings (#2819) [Steven Van Impe][]
  • enh(swift) Grammar improvements (#2908) [Steven Van Impe][]
    • New grammar for keywords and built-ins
    • Added support for operator highlighting
    • New grammar for attributes
    • Added support for quoted identifiers, implicit parameters, and property wrapper projections
    • Support for more complex expressions in string interpolation
  • enh(swift) Improved highlighting for types and generic arguments (#2920) [Steven Van Impe][]
  • enh(swift) Improved highlighting for functions, initializers, and subscripts (#2930) [Steven Van Impe][]
  • fix(http) avoid recursive sublanguage and tighten rules (#2893) [Josh Goebel][]
  • fix(asciidoc): Handle section titles level 5 (#2868) [Vaibhav Chanana][]
  • fix(asciidoc): Support unconstrained emphasis syntax (#2869) [Guillaume Grossetie][]
  • enh(scheme) Allow [] for argument lists (#2913) [Josh Goebel][]
  • enh(vb) Large rework of VB.net grammar (#2808) [Jan Pilzer][]
    • Adds support for Date data types, see (#2775)
    • Adds support for REM comments and fixes ''' doctags (#2875) (#2851)
      • Custom number mode to support VB.net specific number flags
      • Hex (&H), Oct (&O), and binary (&B) prefixes
      • Separating digits with underscores: 90_946
    • Type suffixes: 123UI (unsigned integer)
    • Improves directives detection and adds support for Enable, Disable, and Then keywords
    • Adds more markup tests
  • fix(javascript) Empty block-comments break highlighting (#2896) [Jan Pilzer][]
  • enh(dart) Fix empty block-comments from breaking highlighting (#2898) [Jan Pilzer][]
  • enh(dart) Fix empty doc-comment eating next line [Jan Pilzer][]
  • enh(asciidoc) Adds support for unconstrained bold syntax (#2869) [Guillaume Grossetie][]
  • enh(c-like) Incorrect highlighting for interger suffix (#2919) [Vaibhav Chanana][]
  • enh(properties) Correctly handle trailing backslash (#2922) [Vaibhav Chanana][]

Recent Deprecations:

  • HTML "merging" is deprecated. (#2873) [Josh Goebel][]
    • HTML inside <pre> blocks will no longer be magically merged back into the highlighted code's HTML result - it will instead be silently removed.
    • Consider [using a plugin][htmlPlugin] if you truly need this functionality
    • Deprecated as of 10.5.0 - will be removed in v11.
  • tabReplace option deprecated. (#2873) [Josh Goebel][]
    • Consider: Use the CSS tab-size property, or simply pre-process the text yourself before rendering the initial HTML
    • otherwise, [use a plugin][tabPlugin]
    • Deprecated as of 10.5.0 - will be removed in v11.
  • useBR option deprecated. (#2559) [Josh Goebel][]
    • Recommended: You really should just use the HTML <pre> tag
    • or perhaps try CSS white-space: pre;
    • otherwise, [use a plugin][brPlugin]
    • Deprecated as of 10.3.0 - will be removed in v11.
  • requireLanguage API is deprecated, will be removed in v11.0.
    • Consider: Use getLanguage (with custom error handling) or built-time dependencies.
    • See Library API for more information.
    • Deprecated as of 10.4.0 - will be removed in v11.

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 23 Dec 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