From d2c754addc078bbd20f1c501e9674522403eb1a9 Mon Sep 17 00:00:00 2001 From: Marc Stammerjohann <8985933+marcjulian@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:47:34 +0100 Subject: [PATCH] return provider array --- .../ngx-markdoc/src/lib/provide-markdoc-options.ts | 12 ++++-------- src/app/app.config.ts | 1 - 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/projects/ngx-markdoc/src/lib/provide-markdoc-options.ts b/projects/ngx-markdoc/src/lib/provide-markdoc-options.ts index ec6bcc2..2b8dfec 100644 --- a/projects/ngx-markdoc/src/lib/provide-markdoc-options.ts +++ b/projects/ngx-markdoc/src/lib/provide-markdoc-options.ts @@ -1,8 +1,4 @@ -import { - EnvironmentProviders, - InjectionToken, - makeEnvironmentProviders, -} from '@angular/core'; +import { InjectionToken, Provider } from '@angular/core'; import { Config } from '@markdoc/markdoc'; import { figure, heading, image } from './extensions'; @@ -19,11 +15,11 @@ const defaultConfig: Config = { export function provideMarkdocOptions( markdocOptions?: MarkdocOptions, -): EnvironmentProviders { - return makeEnvironmentProviders([ +): Provider[] { + return [ { provide: MARKDOC_CONFIG, useValue: markdocOptions?.config ?? defaultConfig, }, - ]); + ]; } diff --git a/src/app/app.config.ts b/src/app/app.config.ts index 89671fb..9db02b3 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -10,7 +10,6 @@ import { image, provideMarkdocOptions, } from '@notiz/ngx-markdoc'; -import { Config, Node, Tag } from '@markdoc/markdoc'; import { markdocExample } from './markdoc-example'; export const appConfig: ApplicationConfig = {