WebMarkupMin.Core.GenericHtmlMinifier.DoctypeHandler C# (CSharp) Метод

DoctypeHandler() приватный Метод

Document type declaration handler
private DoctypeHandler ( MarkupParsingContext context, string doctype ) : void
context WebMarkupMin.Core.Parsers.MarkupParsingContext Markup parsing context
doctype string Document type declaration
Результат void
        private void DoctypeHandler(MarkupParsingContext context, string doctype)
        {
            _currentNodeType = HtmlNodeType.Doctype;

            WhitespaceMinificationMode whitespaceMinificationMode = _settings.WhitespaceMinificationMode;
            if (whitespaceMinificationMode != WhitespaceMinificationMode.None)
            {
                // Processing of whitespace, that followed before the document type declaration
                TrimEndLastBufferItem();
            }

            _buffer.Add(_settings.UseShortDoctype ? "<!DOCTYPE html>" : Utils.CollapseWhitespace(doctype));
        }