Пример #1
0
        public string Build(FolderItem page)
        {
            _content = _parser.Transform(_content);

            if (_transformBlocks)
            {
                _content = NoteBlockHelper.GenerateNoteBlocks(_content);
                _content = PanelBlockHelper.GeneratePanelBlocks(_content);
            }

            if (_codeBlocks != null)
            {
                _content = CodeBlockHelper.GenerateCodeBlocks(_content, _documentationVersion, _options, _codeBlocks);
            }

            if (_rawHtmlBlocks != null)
            {
                _content = LegacyBlockHelper.ReplaceRawHtmlPlaceholdersAfterMarkdownTransformation(_content, _rawHtmlBlocks);
            }

            string expectedPageUrl = null;

            page.Metadata?.TryGetValue("url", out expectedPageUrl);

            _content = SocialMediaBlockHelper.ReplaceSocialMediaBlocks(_content, expectedPageUrl);

            return(_content);
        }
Пример #2
0
        private string TransformBlocks(string content, string documentationVersion)
        {
            content = NoteBlockHelper.GenerateNoteBlocks(content);
            content = CodeBlockHelper.GenerateCodeBlocks(content, documentationVersion, _options);
            content = PanelBlockHelper.GeneratePanelBlocks(content);

            return(content);
        }
Пример #3
0
        public string Build()
        {
            _content = _parser.Transform(_content);

            if (_transformBlocks)
            {
                _content = NoteBlockHelper.GenerateNoteBlocks(_content);
                _content = PanelBlockHelper.GeneratePanelBlocks(_content);
            }

            if (_codeBlocks != null)
            {
                _content = CodeBlockHelper.GenerateCodeBlocks(_content, _documentationVersion, _options, _codeBlocks);
            }

            if (_rawHtmlBlocks != null)
            {
                _content = LegacyBlockHelper.ReplaceRawHtmlPlaceholdersAfterMarkdownTransformation(_content, _rawHtmlBlocks);
            }

            return(_content);
        }