File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed
Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 1515 },
1616 "private" : true ,
1717 "dependencies" : {
18+ "@akebifiky/remark-simple-plantuml" : " ^1.0.2" ,
1819 "@angular/animations" : " ^11.0.5" ,
1920 "@angular/cdk" : " ^11.0.3" ,
2021 "@angular/common" : " ^10.2.4" ,
Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ export const MARKDOWN_CONFIG_TOKEN = new InjectionToken<any>( 'forRoot() configu
5050 providedIn : 'root'
5151} )
5252export class MarkdownService {
53+ remarkPlugins : unified . PluggableList ;
54+
5355 // Lazy init processor
5456 @lazyInitialize
5557 get processor ( ) : unified . Processor {
@@ -124,13 +126,6 @@ export class MarkdownService {
124126 . use ( sectionPlugin ) ;
125127 }
126128
127- get remarkPlugins ( ) : unified . PluggableList {
128- if ( Array . isArray ( this . config ) ) {
129- return this . config ;
130- }
131- return this . config . plugins ;
132- }
133-
134129 get bookPath ( ) {
135130 return this . settings . bookPath ;
136131 }
@@ -145,7 +140,7 @@ export class MarkdownService {
145140 @Optional ( ) @Inject ( MARKDOWN_CONFIG_TOKEN ) private config : Preset
146141 ) {
147142 this . config = this . config || { plugins : [ ] } ;
148- this . config . plugins = this . config . plugins || [ ] ;
143+ this . remarkPlugins = this . config . plugins ;
149144 }
150145
151146 linkPlugin = ( ) => {
Original file line number Diff line number Diff line change 11import headings from '@rigor789/remark-autolink-headings' ;
22import frontmatter from 'remark-frontmatter' ;
3+ import simplePlantUML from '@akebifiky/remark-simple-plantuml' ;
34import gfm from 'remark-gfm' ;
45import math from 'remark-math' ;
56import katex from 'remark-html-katex' ;
@@ -52,6 +53,7 @@ export const plugins = [
5253 math ,
5354 katex ,
5455 gemojiToEmoji ,
56+ simplePlantUML ,
5557 infoStringToAttr ,
5658 mermaid ,
5759 prism
You can’t perform that action at this time.
0 commit comments