MarkdownSharp.Markdown.ImageReferenceEvaluator C# (CSharp) Méthode

ImageReferenceEvaluator() private méthode

private ImageReferenceEvaluator ( Match match ) : string
match System.Text.RegularExpressions.Match
Résultat string
        private string ImageReferenceEvaluator(Match match)
        {
            string wholeMatch = match.Groups[1].Value;
            string altText = match.Groups[2].Value;
            string linkID = match.Groups[3].Value.ToLowerInvariant();

            // for shortcut links like ![this][].
            if (linkID == "")
                linkID = altText.ToLowerInvariant();

            if (_urls.ContainsKey(linkID))
            {
                string url = _urls[linkID];
                string title = null;

                if (_titles.ContainsKey(linkID))
                    title = _titles[linkID];

                return ImageTag(url, altText, title);
            }
            else
            {
                // If there's no such link ID, leave intact:
                return wholeMatch;
            }
        }