Docs: Change List to HashSet for highlighted lines

pull/9409/head
EngincanV 4 years ago
parent 3c77636996
commit 8a4c00acf3

@ -98,9 +98,9 @@ namespace Volo.Docs.Markdown.Renderers
} }
} }
private List<int> GetHighlightedLines(FencedCodeBlock fencedCodeBlock) private HashSet<int> GetHighlightedLines(FencedCodeBlock fencedCodeBlock)
{ {
var highlightedLines = new List<int>(); var highlightedLines = new HashSet<int>();
if (string.IsNullOrWhiteSpace(fencedCodeBlock?.Arguments) || !Regex.IsMatch(pattern: Pattern, input: fencedCodeBlock.Arguments)) if (string.IsNullOrWhiteSpace(fencedCodeBlock?.Arguments) || !Regex.IsMatch(pattern: Pattern, input: fencedCodeBlock.Arguments))
{ {
return highlightedLines; return highlightedLines;

Loading…
Cancel
Save