diff --git a/MarkdownToRW/MarkdownConverter/ContentScan/ContentScanner.cs b/MarkdownToRW/MarkdownConverter/ContentScan/ContentScanner.cs index b9fb83e..f7619bd 100644 --- a/MarkdownToRW/MarkdownConverter/ContentScan/ContentScanner.cs +++ b/MarkdownToRW/MarkdownConverter/ContentScan/ContentScanner.cs @@ -151,14 +151,14 @@ private static void ScanWords(ref ScanResults results, string markdownText) { if (britshAmericanWordsDict.ContainsKey(word.ToLower())) { - string american = britshAmericanWordsDict[word]; + string american = britshAmericanWordsDict[word.ToLower()]; results.ProblemsFound.Add("British word found: '" + word + "'. Please replace this with '" + american + "'."); } if (commonMisspelledWordsDict.ContainsKey(word.ToLower())) { - string correctSpelling = commonMisspelledWordsDict[word]; + string correctSpelling = commonMisspelledWordsDict[word.ToLower()]; results.ProblemsFound.Add("Incorrectly spelled word found: '" + word + "'. Please replace this with '" + correctSpelling + "'."); } diff --git a/MarkdownToRW/MarkdownConverter/DragonConverter/Converter.cs b/MarkdownToRW/MarkdownConverter/DragonConverter/Converter.cs index 87abea4..cbb0d0f 100644 --- a/MarkdownToRW/MarkdownConverter/DragonConverter/Converter.cs +++ b/MarkdownToRW/MarkdownConverter/DragonConverter/Converter.cs @@ -20,7 +20,6 @@ public static string ConvertMarkdownStringToHtml(string markdown, ConverterOptio //MarkdownPipeline pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build(); MarkdownPipeline pipeline = new MarkdownPipelineBuilder().UseEmphasisExtras().UseCustomContainers().Build(); - string output = Markdown.ToHtml(markdown, pipeline); //Console.WriteLine(output); @@ -37,6 +36,7 @@ public static string ConvertMarkdownStringToHtml(string markdown, ConverterOptio // Add attributes AddClassToImages(ref output, options.FirstImageIsAlignedRight, rootPath); + AddExtraAttributesToLinks(ref output); // Make new lines consistent across platforms @@ -81,7 +81,6 @@ public static string ConvertMarkdownStringToHtml(string markdown, ConverterOptio output = WebUtility.HtmlDecode(output); } - output = output.Trim(); return output; } @@ -118,7 +117,7 @@ private static void AddClassToImages(ref string html, bool firstImageRightAligne HtmlNode node = imgNodes[i]; // If root path is known, check if images are too big for full size class - if (rootPath != null) + if (rootPath != null && File.Exists(DragonUtil.GetFullFilePath(node.Attributes["src"].Value, rootPath))) { var imageSize = ImageHelper.GetDimensions(DragonUtil.GetFullFilePath(node.Attributes["src"].Value, rootPath)); diff --git a/MarkdownToRW/MarkdownConverter/DragonVersion.cs b/MarkdownToRW/MarkdownConverter/DragonVersion.cs index be44974..ccbb92e 100644 --- a/MarkdownToRW/MarkdownConverter/DragonVersion.cs +++ b/MarkdownToRW/MarkdownConverter/DragonVersion.cs @@ -2,6 +2,6 @@ namespace DragonMarkdown { public static class DragonVersion { - public static readonly decimal VERSION = 1.18m; + public static readonly decimal VERSION = 1.19m; } } diff --git a/MarkdownToRW/MarkdownConverter/DragonWordPressXml/DragonWordPressClient.cs b/MarkdownToRW/MarkdownConverter/DragonWordPressXml/DragonWordPressClient.cs index 7a73d2c..47e5934 100644 --- a/MarkdownToRW/MarkdownConverter/DragonWordPressXml/DragonWordPressClient.cs +++ b/MarkdownToRW/MarkdownConverter/DragonWordPressXml/DragonWordPressClient.cs @@ -119,6 +119,9 @@ public GetProfileResponse SendGetProfileRequest(GetProfileRequest request) // Get response var rpcResponse = rpcClient.Execute>(rpcRequest); + Console.WriteLine("RESPONSE:"); + Console.WriteLine(rpcResponse.Content); + // Find and fill members in XmlMemberSearcher searcher = new XmlMemberSearcher(rpcResponse.Content); response.Bio = searcher.GetValueOfMember("bio");