123123
This commit is contained in:
@@ -4,18 +4,18 @@ using ZelWiki.Engine.Library.Interfaces;
|
||||
namespace ZelWiki.Engine.Implementation
|
||||
{
|
||||
/// <summary>
|
||||
/// Handles links the wiki to another site.
|
||||
/// 处理链接
|
||||
/// </summary>
|
||||
public class ExternalLinkHandler : IExternalLinkHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// Handles an internal wiki link.
|
||||
/// 处理内链
|
||||
/// </summary>
|
||||
/// <param name="state">Reference to the wiki state object</param>
|
||||
/// <param name="link">The address of the external site being linked to.</param>
|
||||
/// <param name="text">The text which should be show in the absence of an image.</param>
|
||||
/// <param name="image">The image that should be shown.</param>
|
||||
/// <param name="imageScale">The 0-100 image scale factor for the given image.</param>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="link"></param>
|
||||
/// <param name="text"></param>
|
||||
/// <param name="image"></param>
|
||||
/// <returns></returns>
|
||||
public HandlerResult Handle(IZelEngineState state, string link, string? text, string? image)
|
||||
{
|
||||
if (string.IsNullOrEmpty(image))
|
||||
@@ -25,13 +25,11 @@ namespace ZelWiki.Engine.Implementation
|
||||
Instructions = [Constants.HandlerResultInstruction.DisallowNestedProcessing]
|
||||
};
|
||||
}
|
||||
else
|
||||
|
||||
return new HandlerResult($"<a href=\"{link}\"><img src=\"{image}\" border =\"0\"></a>")
|
||||
{
|
||||
return new HandlerResult($"<a href=\"{link}\"><img src=\"{image}\" border =\"0\"></a>")
|
||||
{
|
||||
Instructions = [Constants.HandlerResultInstruction.DisallowNestedProcessing]
|
||||
};
|
||||
}
|
||||
Instructions = [Constants.HandlerResultInstruction.DisallowNestedProcessing]
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user