public HighlightJsCodeBlockRenderer( IHighlightJsEngine highlightJsEngine, CodeBlockRenderer underlyingRenderer = null) { _highlightJsEngine = highlightJsEngine; _underlyingRenderer = underlyingRenderer ?? new CodeBlockRenderer(); }
public static MarkdownPipelineBuilder UseHighlightJs(this MarkdownPipelineBuilder pipeline, IHighlightJsEngine highlightJsEngine = null) { if (highlightJsEngine == null) { lock (Lock) { if (_sharedEngine == null) { _sharedEngine = new HighlightJsEngine(); } highlightJsEngine = _sharedEngine; } } pipeline.Extensions.Add(new HighlightJsExtension(highlightJsEngine)); return(pipeline); }
public HighlightJsExtension(IHighlightJsEngine highlightJsEngine) { _highlightJsEngine = highlightJsEngine; }