Пример #1
0
		public static string RenderMd(this string md, string baseUrl = null)
		{
			var texReplacer = new TexReplacer(md);

			var markdown = new Markdown2(baseUrl)
			{
				NewWindowForExternalLinks = true,
				ExtraMode = true,
				SafeMode = false,
				MarkdownInHtml = false
			};

			var html = markdown.Transform(texReplacer.ReplacedText);
			return texReplacer.PlaceTexInsertsBack(html);
		}
Пример #2
0
        public static string RenderMd(this string md, string baseUrl = null)
        {
            var texReplacer = new TexReplacer(md);

            var markdown = new Markdown2(baseUrl)
            {
                NewWindowForExternalLinks = true,
                ExtraMode      = true,
                SafeMode       = false,
                MarkdownInHtml = false
            };

            var html = markdown.Transform(texReplacer.ReplacedText);

            return(texReplacer.PlaceTexInsertsBack(html));
        }
Пример #3
0
        public static Tuple <string, List <string> > GetHtmlWithUrls(this string md, string baseUrl = null)
        {
            var texReplacer = new EdxTexReplacer(md);

            var markdown = new Markdown2(baseUrl, false)
            {
                NewWindowForExternalLinks = true,
                ExtraMode      = true,
                SafeMode       = false,
                MarkdownInHtml = false,
            };

            var relativeUrls = new List <string>();

            markdown.RelativeUrl += relativeUrls.Add;

            var html = markdown.Transform(texReplacer.ReplacedText);

            return(Tuple.Create(texReplacer.PlaceTexInsertsBack(html), relativeUrls));
        }
Пример #4
0
		public static Tuple<string, List<string>> GetHtmlWithUrls(this string md, string baseUrl = null)
		{
			
			var texReplacer = new EdxTexReplacer(md);

			var markdown = new Markdown2(baseUrl, false)
			{
				NewWindowForExternalLinks = true,
				ExtraMode = true,
				SafeMode = false,
				MarkdownInHtml = false,
			};
			
			var relativeUrls = new List<string>();
			markdown.RelativeUrl += relativeUrls.Add;

			var html = markdown.Transform(texReplacer.ReplacedText);
			
			return Tuple.Create(texReplacer.PlaceTexInsertsBack(html), relativeUrls);
		}