Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
        public void TransformBlocks()
        {
            _transformBlocks = true;

            _content = CodeBlockHelper.ReplaceCodeBlocksWithPlaceholders(_content, out _codeBlocks);
        }