/// <summary>Visits the provided <paramref name="preformattedBlock"/> element.</summary> /// <param name="preformattedBlock">The <see cref="PreformattedBlockElement"/> to visit.</param> protected internal override void Visit(PreformattedBlockElement preformattedBlock) { BeginElement("pre"); BeginElementWithoutIndent("code"); Write(preformattedBlock.PreformattedText); EndElementWithoutIndent(); EndElementWithoutIndent(); }
public void EscapesHtmlSpecialCharactersForPreformattedBlock(string text, string expectedHtml) { var actualHtml = new PreformattedBlockElement(text).Accept(new HtmlWriterVisitor()); Assert.Equal(expectedHtml, actualHtml); }
/// <summary>Visits the provided <paramref name="preformattedBlock"/> element.</summary> /// <param name="preformattedBlock">The <see cref="PreformattedBlockElement"/> to visit.</param> protected internal abstract void Visit(PreformattedBlockElement preformattedBlock);