From a19ea88b1385b85b16070a84d287229a693093b5 Mon Sep 17 00:00:00 2001 From: Rick Strahl Date: Mon, 4 Sep 2017 20:52:17 -0700 Subject: [PATCH] Change MarkdigExtensions configuration property to be a comma delimited string instead of + delimited as Markdig requires for its `Configure()` method. --- .../_Classes/Configuration/MarkdownOptionsConfiguration.cs | 4 ++-- .../_Classes/MarkdownParser/MarkdownParserMarkDig.cs | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/MarkdownMonster/_Classes/Configuration/MarkdownOptionsConfiguration.cs b/MarkdownMonster/_Classes/Configuration/MarkdownOptionsConfiguration.cs index 5b86ae9f4..714073754 100644 --- a/MarkdownMonster/_Classes/Configuration/MarkdownOptionsConfiguration.cs +++ b/MarkdownMonster/_Classes/Configuration/MarkdownOptionsConfiguration.cs @@ -80,12 +80,12 @@ public string MarkdigExtensions get { return _markdigExtensions; } set { - if (value == _markdigExtensions) return; + if (value == _markdigExtensions) return; _markdigExtensions = value; OnPropertyChanged(); } } - private string _markdigExtensions = "emphasisextras+pipetables+gridtables+footers+footnotes+citations+attributes"; + private string _markdigExtensions = "emphasisextras,pipetables,gridtables,footers,footnotes,citations,attributes"; #endregion diff --git a/MarkdownMonster/_Classes/MarkdownParser/MarkdownParserMarkDig.cs b/MarkdownMonster/_Classes/MarkdownParser/MarkdownParserMarkDig.cs index 9fc04e233..6fc5306d5 100644 --- a/MarkdownMonster/_Classes/MarkdownParser/MarkdownParserMarkDig.cs +++ b/MarkdownMonster/_Classes/MarkdownParser/MarkdownParserMarkDig.cs @@ -122,15 +122,13 @@ protected virtual MarkdownPipelineBuilder CreatePipelineBuilder() { if (!string.IsNullOrWhiteSpace(options.MarkdigExtensions)) { - builder = builder.Configure(options.MarkdigExtensions); + builder = builder.Configure(options.MarkdigExtensions.Replace(",","+")); } } catch(ArgumentException ex) { // One or more of the extension options is invalid. - // Processing of the extensions stopped at this point. - // Log an error. - mmApp.Log(ex); + mmApp.Log("Failed to load Markdig extensions: " + options.MarkdigExtensions + "\r\n" + ex.Message,ex); } return builder;