Пример #1
0
		public override void Render(CreoleParser parser, CreoleWriter writer)
		{
			var resolvedUrl = parser.ResolveLink(url);

			var isExternal = resolvedUrl.StartsWith("http://") || resolvedUrl.StartsWith("https://") || resolvedUrl.StartsWith("ftp://");

			writer.AppendRaw("<a href=\"{0}\"{1}>", HttpUtility.UrlPathEncode(resolvedUrl), isExternal ? " target=\"_blank\"" : string.Empty);
			if (parseContent)
				writer.AppendRaw(parser.ParseInlines(content, TryParse));
			else
				writer.Append(content);
			writer.AppendRaw("</a>");
		}
Пример #2
0
		public override void Render(CreoleParser parser, CreoleWriter writer)
		{
			writer.AppendRaw("<pre>");
			writer.Append(content);
			writer.AppendRawLine("</pre>");
		}
Пример #3
0
		public override void Render(CreoleParser parser, CreoleWriter writer)
		{
			writer.Append(content);
		}
Пример #4
0
		public override void Render(CreoleParser parser, CreoleWriter writer)
		{
			writer.AppendRaw("<h{0}>", level);
			writer.Append(content);
			writer.AppendRaw("</h{0}>", level);
		}