Beispiel #1
0
        public virtual StringBuffer Render(IMarkdownRenderer render, DfmXrefInlineToken token, IMarkdownContext context)
        {
            var content = StringBuffer.Empty;

            content += token.Href.NormalizeLink(_filePath, _baseDir);
            content += Constants.Separator;

            return(content);
        }
        public virtual StringBuffer Render(IMarkdownRenderer render, DfmXrefInlineToken token, MarkdownInlineContext context)
        {
            if (token.Rule is DfmXrefShortcutInlineRule)
            {
                if (TryResolveUid(token.Href))
                {
                    return($"@\"{token.Href}\"");
                }
            }

            return(base.Render(render, token, context));
        }
        public StringBuffer Render(IMarkdownRenderer render, DfmXrefInlineToken token, MarkdownInlineContext context)
        {
            if (token.Rule is DfmXrefShortcutInlineRule)
            {
                if (TryResolveUid(token.Href))
                {
                    return($"@\"{token.Href}\"");
                }
            }

            return(token.SourceInfo.Markdown);
        }