public override StringBuffer Render(IMarkdownRenderer markdownRenderer, MarkdownCodeBlockToken token, MarkdownBlockContext context) { IPlantUmlRenderer plantUmlRenderer = rendererFactory.CreateRenderer(settings); IOutputFormatter outputFormatter = formatterFactory.CreateOutputFormatter(markdownRenderer.Options); byte[] output = plantUmlRenderer.Render(token.Code, settings.OutputFormat); return(outputFormatter.FormatOutput(token, output)); }
public PlantUmlRenderer(MarkdownPipeline pipeline) { var renderFactory = new PlantUml.Net.RendererFactory(); _render = renderFactory.CreateRenderer(new PlantUml.Net.PlantUmlSettings { RemoteUrl = "https://www.plantuml.com/plantuml/", //TODO: expose these are configurable RenderingMode = PlantUml.Net.RenderingMode.Remote, }); this._pipeline = pipeline; }
public Renderer(PlantUmlSettings plantUmlSettings = null) { PlantUmlRenderer = new RendererFactory().CreateRenderer(plantUmlSettings ?? new PlantUmlSettings { RemoteUrl = "https://www.plantuml.com/plantuml/" }); }