public static string MakeTextFlat(string markdown, ConverterHooksConfig converterHooksConfig) { var text = MakeText(markdown, converterHooksConfig); string flattened = FlattenNewlinesRegex.Replace(text, " "); return(flattened); }
public static string MakeTextHtmlLinebreaks(string markdown, ConverterHooksConfig converterHooksConfig) { var text = MakeText(markdown, converterHooksConfig); string htmlLinebreaksText = ReplaceWithHtmlLinebreaks(text); return(htmlLinebreaksText); }
public static string MakeText(string markdown, ConverterHooksConfig converterHooksConfig) { var trimmedMarkdown = TrimServerSideMarkdown(markdown); var html = MakeHtml(trimmedMarkdown, converterHooksConfig); var stripped = GetDocumentText(html); return(stripped); }
public static string MakeHtml(string markdown, ConverterHooksConfig converterHooksConfig) { if (markdown == null) { throw new ArgumentNullException("markdown"); } if (converterHooksConfig == null) { throw new ArgumentNullException("converterHooksConfig"); } string convertedMarkdown = converterHooksConfig.ApplyPreConversions(markdown); string html = MarkdownConverter.Transform(convertedMarkdown); string convertedHtml = converterHooksConfig.ApplyPostConversions(html); return(convertedHtml); }