コード例 #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);
		}