Fixes the url BBcode usage when no text to display

has been specified
vnext
Paul Schneider 10 years ago
parent e676d2fdbf
commit 017a6fde23
1 changed files with 2 additions and 8 deletions

@ -106,7 +106,7 @@ namespace Yavsc.Helpers
// prevents a failure at second call
parent.Clear ();
BBTag urlBBTag = new BBTag ("url", "<a href=\"${href}\">", "</a>", true, true, UrlContentTransformer, new BBAttribute ("href", "",UrlAttributeTransformer), new BBAttribute ("href", "href",UrlAttributeTransformer));
BBTag urlBBTag = new BBTag ("url", "<a href=\"${href}\">", "</a>", true, true, UrlContentTransformer, new BBAttribute ("href", ""), new BBAttribute ("href", "href"));
BBTag bblist =new BBTag ("list", "<ul>", "</ul>");
BBTag bbs2=new BBTag ("sect2",
@ -263,17 +263,11 @@ namespace Yavsc.Helpers
InitDocPage ();
return toc+instr;
}
static string urlValue = null;
static string UrlAttributeTransformer (IAttributeRenderingContext arg)
{
urlValue = arg.AttributeValue;
return webm;
}
static string UrlContentTransformer (string instr)
{
if (string.IsNullOrWhiteSpace (instr)) {
return "<"+urlValue+">";
return "-&gt;";
} else
return instr;
}

Loading…