Skip to content

Latest commit

 

History

History
167 lines (103 loc) · 8.59 KB

CHANGELOG.md

File metadata and controls

167 lines (103 loc) · 8.59 KB

Changelog

4.1.3

  • Upgrade to Angular 11
  • Build the library in strict mode

Breaking changes:

  • refactor: Highlight directive => function highlightElement(code: string, languages: string[]): the languages param is not optional anymore.

4.1.2

  • fix: codeFromUrl display error message in the console even though it works, closes #141 in d60dc10.

4.1.1

  • Upgrade project to Angular 10.
  • fix: Remove the default behavior of adding highlight.js to the bundle directory, closes #122 in 339ff18.
  • fix: Setting the highlighted code to empty string will not reflect the value change, closes #199 in 9ee1942.

4.1.0-beta

  • Upgrade to Angular 9 in #113.
  • fix: Remove warning when the package is installed in Angular 9 in 6d491be.

4.0.2

  • fix: use element.textContent to set the code before highlighting, closes #105 in 34afad7.

4.0.1

  • fix: Change r property name to relevance in HighlightResult interface, closes #84 in ce53661.
  • fix: Sanitize highlighted code before appending it to the DOM, closes #101 in 9afe6b6.
  • fix: Check if nativeElement.firstChildElement is not null before calling line numbers lib, in 494c976.

4.0.0

  • feat: Lazy-load hljs library, closes #89 in 8cdba13.
  • feat: Lazy-load languages scripts, in 952f33c.
  • feat: Gist directive, closes #90 in 8b4c8fc.
  • feat: Highlight code directly from URL, closes #91 in 5fa3c59.
  • feat: Line numbers, closes #35 in c19b878.
  • enhance: Move highlight.js package from peerDependencies to dependencies
  • fix: Check if [highlight] input got undefined value, closes #81 in f2b14bd.
  • fix: Add test files, closes #79 in 2913d05.

Breaking Changes

  • Since the core library highlight.js will be lazy-loaded, all hljs functions in HighlightJS will return observables to make sure the library is loaded before execution.
  • HighlightChildren directive has been deprecated.
  • The global options languages property NgScrollOptions.languages type has changed.
  • HighlightModule.forRoot() is deprecated, the highlight global options can be set using the injection token HIGHLIGHT_OPTIONS

3.0.3

  • fix(HighlightChildren): fix OnDestroy() error (Cannot read property 'disconnect' of undefined), closes #75 in 3379905.

3.0.2

  • fix(HighlightChildren): Highlight children not working inside [innerHtml], closes #67 in 969f3b3.

3.0.0

Breaking Changes

Version 3 is written from scratch, Please read the updated documentations.

2.1.4

  • fix(HighlightJS): load hljs theme only if hljs script is loaded automatically, closes #56 in 66d0688.

2.1.3

  • fix(HighlightJS): Fix initializing hljs configure and the function parameter interface hljs.configure(config: HighlightConfig).
  • refactor(HighlightJS): Inject DOCUMENT to access the document class, in 4ff6ceb.
  • enhance(HighlightJS): Access hljs from document.defaultView.
  • Add rxjs as peerDependency.

2.1.2

  • fix peerDependencies for Angular >= 6
  • refactor(HighlightJS): Provide HighlightJS using providedIn: 'root'

2.1.1

  • refactor(HighlightJS): Add types on parameters in hljs functions, fixed in #40

2.1.0

  • feat(HighlightJS): Expose HighlightJS service with original functions, closes #37 in 90a8e17.

2.0.2

  • fix(Build): fix AOT build error, closes #31 in 161b36

2.0.1

  • Upgrade to Angular 6, closes #28 in #30

1.4.1

  • Fix(HighlightDirective): highlight="all", Apply .hljs class on code elements only, closes #23

1.4.0

  • Feature(language input): an array of language names and aliases restricting auto detection to only these languages, closes #20.
  • Feature(hljs global config): set global config in HighlightModule.forRoot({ config: hljsConfig })).
  • Support the manual load of hljs script and styles.

1.3.0

  • Feature: Add (highlighted) output, a stream that emits higlight result, closes #16.

1.2.6

  • Refactor with RxJS pipe 5.5 style

1.2.3

  • Fix(HighlightService) Move InjectionToken to a seperate file, closes #11

1.2.2

  • No Changes, just an update for the build enviroment

1.2.1

  • fix(HighlightDirective): Use el.tagName.toLowerCase() to check for if the highlight element is type of <code>

1.2.0

  • Remove HighlightUmdModule and systemjs support
  • Refactir(HighlightModule)
  • Add [code] input

1.1.1

  • Improve performance

  • Fix load hljs script only once

  • Remove hlAuto and hlDelay inputs from HighlightDirective, but they are still usable in HighlightUmdDirective

  • Update HighlightModule parameter:

    before:

      HighlightModule.forRoot('monokai-sublime', 'assets/js/highlight-js');

    after

      HighlightModule.forRoot({
        theme: 'monokai-sublime',
        path: 'assets/js/highlight-js',
        auto: true
      });

1.0.0

  • feat(HighlightModule): Choose highlight theme and set library path
  • feat(Auto-load script)
  • feat(Auto-load theme)

0.0.1

  • Initial release