< Summary

Information
Class: Chronicis.Api.Services.ParsedLink
Assembly: Chronicis.Api
File(s): /home/runner/work/chronicis/chronicis/src/Chronicis.Api/Services/ILinkParser.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 23
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_TargetArticleId()100%11100%

File(s)

/home/runner/work/chronicis/chronicis/src/Chronicis.Api/Services/ILinkParser.cs

#LineLine coverage
 1namespace Chronicis.Api.Services;
 2
 3/// <summary>
 4/// Service for parsing wiki-style links from article markdown.
 5/// </summary>
 6public interface ILinkParser
 7{
 8    /// <summary>
 9    /// Extracts all wiki links from the given article body.
 10    /// Format: [[guid]] or [[guid|Display Text]]
 11    /// </summary>
 12    /// <param name="body">The markdown body to parse.</param>
 13    /// <returns>Collection of parsed links with target ID, display text, and position.</returns>
 14    IEnumerable<ParsedLink> ParseLinks(string? body);
 15}
 16
 17/// <summary>
 18/// Represents a parsed wiki link from article markdown.
 19/// </summary>
 20/// <param name="TargetArticleId">The GUID of the article being linked to.</param>
 21/// <param name="DisplayText">Custom display text, or null to use target article's title.</param>
 22/// <param name="Position">Character offset in the source body where this link appears.</param>
 8623public record ParsedLink(Guid TargetArticleId, string? DisplayText, int Position);

Methods/Properties

get_TargetArticleId()