This commit is contained in:
Zel
2025-02-24 21:09:37 +08:00
parent 7c66d080b2
commit 0a18353a5f
4 changed files with 53 additions and 52 deletions

View File

@@ -93,9 +93,10 @@ namespace ZelWiki.Engine
}
/// <summary>
/// 转换单行和多行的基本标记,如粗体、斜体、下划线等.
/// 转换单行和多行的基本标记,如粗体、斜体、下划线等
/// </summary>
/// <param name="pageContent"></param>
/// <param name="matchStore"></param>
private static void TransformMarkup(WikiString pageContent, Dictionary<string, string> matchStore)
{
var symbols = WikiUtility.GetApplicableSymbols(pageContent.Value);
@@ -127,9 +128,10 @@ namespace ZelWiki.Engine
}
/// <summary>
/// 转换链接这些链接可以是内部Wiki链接或外部链接.
/// 转换链接这些链接可以是内部Wiki链接或外部链接
/// </summary>
/// <param name="pageContent"></param>
/// <param name="matchStore"></param>
private static void TransformLinks(WikiString pageContent, Dictionary<string, string> matchStore)
{
//解析外部链接 [[http://test.net]].
@@ -137,7 +139,7 @@ namespace ZelWiki.Engine
var matches = WikiUtility.OrderMatchesByLengthDescending(rgx.Matches(pageContent.ToString()));
foreach (var match in matches)
{
string keyword = match.Value.Substring(2, match.Value.Length - 4).Trim();
var keyword = match.Value.Substring(2, match.Value.Length - 4).Trim();
var args = FunctionParser.ParseRawArgumentsAddParenthesis(keyword);
if (args.Count > 1)
@@ -155,7 +157,7 @@ namespace ZelWiki.Engine
matches = WikiUtility.OrderMatchesByLengthDescending(rgx.Matches(pageContent.ToString()));
foreach (var match in matches)
{
string keyword = match.Value.Substring(2, match.Value.Length - 4).Trim();
var keyword = match.Value.Substring(2, match.Value.Length - 4).Trim();
var args = FunctionParser.ParseRawArgumentsAddParenthesis(keyword);
if (args.Count == 1)
@@ -173,7 +175,7 @@ namespace ZelWiki.Engine
matches = WikiUtility.OrderMatchesByLengthDescending(rgx.Matches(pageContent.ToString()));
foreach (var match in matches)
{
string keyword = match.Value.Substring(2, match.Value.Length - 4);
var keyword = match.Value.Substring(2, match.Value.Length - 4);
var args = FunctionParser.ParseRawArgumentsAddParenthesis(keyword);
if (args.Count == 1)