コード例 #1
0
 public override void Apply(MarkupContent content, MarkupRendererContext context)
 {
     var match = Expression.Match(content.Html);
     while (match != null && match.Success)
     {
         var tagname = "h" + (match.Groups[1].Value.Length + 1);
         content.Html = content.Html.Replace(match.Groups[0].Value, string.Format("<{0}>{1}</{0}>\r\n\r\n", tagname, match.Groups[2].Value));
         match = Expression.Match(content.Html);
     }
 }
コード例 #2
0
 public override void Apply(MarkupContent content, MarkupRendererContext context)
 {
     content.Html = Expression.Replace(content.Html, "<blockquote><p>${Quote}</p><p><span class='author'>${Author}</span></p></blockquote>");
 }
コード例 #3
0
 public override void Apply(MarkupContent content, MarkupRendererContext context)
 {
     content.Html = Expression.Replace(content.Html, "<hr />");
 }
コード例 #4
0
ファイル: BoldFormatter.cs プロジェクト: PaulStovell/bindable
 public override void Apply(MarkupContent content, MarkupRendererContext context)
 {
     content.Html = Expression.Replace(content.Html, "$1<strong>$2</strong>");
 }