public HighlightJsCodeBlockRenderer(
     IHighlightJsEngine highlightJsEngine,
     CodeBlockRenderer underlyingRenderer = null)
 {
     _highlightJsEngine  = highlightJsEngine;
     _underlyingRenderer = underlyingRenderer ?? new CodeBlockRenderer();
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public HighlightJsExtension(IHighlightJsEngine highlightJsEngine)
 {
     _highlightJsEngine = highlightJsEngine;
 }