Fixes the url BBcode usage when no text to display
has been specified
This commit is contained in:
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
|
// prevents a failure at second call
|
||||||
parent.Clear ();
|
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 bblist =new BBTag ("list", "<ul>", "</ul>");
|
||||||
BBTag bbs2=new BBTag ("sect2",
|
BBTag bbs2=new BBTag ("sect2",
|
||||||
|
|
@ -263,17 +263,11 @@ namespace Yavsc.Helpers
|
||||||
InitDocPage ();
|
InitDocPage ();
|
||||||
return toc+instr;
|
return toc+instr;
|
||||||
}
|
}
|
||||||
static string urlValue = null;
|
|
||||||
static string UrlAttributeTransformer (IAttributeRenderingContext arg)
|
|
||||||
{
|
|
||||||
urlValue = arg.AttributeValue;
|
|
||||||
return webm;
|
|
||||||
}
|
|
||||||
|
|
||||||
static string UrlContentTransformer (string instr)
|
static string UrlContentTransformer (string instr)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace (instr)) {
|
if (string.IsNullOrWhiteSpace (instr)) {
|
||||||
return "<"+urlValue+">";
|
return "->";
|
||||||
} else
|
} else
|
||||||
return instr;
|
return instr;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue