[AYA] Make returns a separate h2

This commit is contained in:
LDA 2024-08-04 21:19:30 +02:00
commit 4fbdf05176
2 changed files with 6 additions and 5 deletions

View file

@ -35,6 +35,7 @@ a:link
.aya-arg
{
text-decoration: underline;
color: #fabd2f;
}
.aya-name
{

View file

@ -144,12 +144,10 @@ GenerateReturns(Stream *out, AyadocComment *ayadoc, HeaderDeclaration decl, char
{
if (StrEquals(val, "NOTHING"))
{
StreamPrintf(out, " <span class='rets-none'>nothing.</span>");
StreamPrintf(out, "<span class='rets-none'>Nothing.</span>");
return;
}
StreamPrintf(out, ": ");
/* TODO: Split all arguments by the '|', and handle them automatically
* (with live-alongs, special capped params, ... */
StreamPrintf(out, " <span class='rets-span'>%s</span>", val);
@ -164,7 +162,7 @@ GenerateHTML(Stream *out, AyadocComment *ayadoc, HeaderDeclaration decl)
StreamPrintf(out, "<div id='fdiv-%s'>", decl.name);
{
StreamPrintf(out, "<h2><code>%s</code></h2><hr/>", decl.name);
StreamPrintf(out, "<hr/>");
StreamPrintf(out, "<h3>Signature</h3>");
StreamPrintf(out, "<div id='sdiv-%s'>", decl.name);
@ -221,7 +219,7 @@ GenerateHTML(Stream *out, AyadocComment *ayadoc, HeaderDeclaration decl)
{
/* TODO: Be a little more advanced. */
StreamPrintf(out, "<div class='aya-pret' id='pret-%s'>", decl.name);
StreamPrintf(out, "Returns");
StreamPrintf(out, "<h2>Returns</h2>");
GenerateReturns(out, ayadoc, decl, value);
StreamPrintf(out, "</div>");
StreamFlush(out);
@ -288,6 +286,8 @@ Main(Array *args, HashMap *env)
StreamPrintf(output, "</head>");
StreamPrintf(output, "<body>");
StreamPrintf(output, "<center><h1>Ayaya!: %s</h1></center>", header);
StreamPrintf(output, "<br/>");
/* TODO */
{
AyadocComment *comm = NULL;