This commit is contained in:
Zel
2025-02-23 18:47:21 +08:00
parent eaaffeeccb
commit e46a7ca31c
104 changed files with 2630 additions and 2516 deletions

View File

@@ -3,18 +3,16 @@ using ZelWiki.Engine.Library.Interfaces;
namespace ZelWiki.Engine.Implementation
{
/// <summary>
/// Handles wiki headings. These are automatically added to the table of contents.
/// </summary>
public class HeadingHandler : IHeadingHandler
{
/// <summary>
/// Handles wiki headings. These are automatically added to the table of contents.
/// 处理白哦提
/// </summary>
/// <param name="state">Reference to the wiki state object</param>
/// <param name="depth">The size of the header, also used for table of table of contents indentation.</param>
/// <param name="link">The self link reference.</param>
/// <param name="text">The text for the self link.</param>
/// <param name="state"></param>
/// <param name="depth"></param>
/// <param name="link"></param>
/// <param name="text"></param>
/// <returns></returns>
public HandlerResult Handle(IZelEngineState state, int depth, string link, string text)
{
if (depth >= 2 && depth <= 6)
@@ -22,11 +20,12 @@ namespace ZelWiki.Engine.Implementation
int fontSize = 8 - depth;
if (fontSize < 5) fontSize = 5;
string html = "<font size=\"" + fontSize + "\"><a name=\"" + link + "\"><span class=\"WikiH" + (depth - 1).ToString() + "\">" + text + "</span></a></font>\r\n";
string html = "<font size=\"" + fontSize + "\"><a name=\"" + link + "\"><span class=\"WikiH" +
(depth - 1).ToString() + "\">" + text + "</span></a></font>\r\n";
return new HandlerResult(html);
}
return new HandlerResult() { Instructions = [Constants.HandlerResultInstruction.Skip] };
}
}
}
}