public void Reset(Control host) { H1.Reset(host); H2.Reset(host); H3.Reset(host); H4.Reset(host); H5.Reset(host); H6.Reset(host); BlockQuote.Reset(host); P.Reset(host); FigCaption.Reset(host); Pre.Reset(host); Dt.Reset(host); Dd.Reset(host); Li.Reset(host); A.Reset(host); Span.Reset(host); Label.Reset(host); Q.Reset(host); Cite.Reset(host); I.Reset(host); Em.Reset(host); Mark.Reset(host); Time.Reset(host); Code.Reset(host); Strong.Reset(host); }
public void Merge(params DocumentStyle[] styles) { if (styles != null) { foreach (var style in styles) { Section.Merge(style.Section); Article.Merge(style.Article); Header.Merge(style.Header); Footer.Merge(style.Footer); Main.Merge(style.Main); Figure.Merge(style.Figure); Details.Merge(style.Details); Summary.Merge(style.Summary); Div.Merge(style.Div); Ul.Merge(style.Ul); Ol.Merge(style.Ol); Dl.Merge(style.Dl); Td.Merge(style.Td); Table.Merge(style.Table); Img.Merge(style.Img); YouTube.Merge(style.YouTube); Channel9.Merge(style.Channel9); H1.Merge(style.H1); H2.Merge(style.H2); H3.Merge(style.H3); H4.Merge(style.H4); H5.Merge(style.H5); H6.Merge(style.H6); BlockQuote.Merge(style.BlockQuote); P.Merge(style.P); FigCaption.Merge(style.FigCaption); Pre.Merge(style.Pre); Dt.Merge(style.Dt); Dd.Merge(style.Dd); Li.Merge(style.Li); A.Merge(style.A); Span.Merge(style.Span); Label.Merge(style.Label); Q.Merge(style.Q); Cite.Merge(style.Cite); I.Merge(style.I); Em.Merge(style.Em); Mark.Merge(style.Mark); Time.Merge(style.Time); Code.Merge(style.Code); Strong.Merge(style.Strong); } } }
public void CiteKeysExtractingTest() { // Arrange var content = @"It is well known \cite{ref1, ref2 ,ref3 } that"; var start = content.IndexOf(@"\cite"); var end = content.LastIndexOf("}"); // Act var cite = new Cite(start, content.Substring(start, end - start + 1)); // Assert CollectionAssert.AreEqual(new[] { "ref1", "ref2", "ref3" }, cite.Keys); }
public override Cite VisitCite(Cite cite) { cite = citeDelegate?.Invoke(cite) ?? cite; return(base.VisitCite(cite)); }
public void CiteMarkupTest() { Assert.AreEqual(@"\cite{ref1, ref2, ref3}", Cite.GenerateMarkup(new[] { "ref1", "ref2", "ref3" })); }