public override IDocumentNode VisitEmphasis(DashParser.EmphasisContext context) { var node = new EmphasisNode { Class = ((ValueNode <string>)context.headerContent().Accept(this)).Value }; node.Children.AddRange(context.emphasisLine().Accept(this).Children.DumpCollectionNodes().Cast <LineNode.IChild>()); return(node); }
public override void VisitEmphasis(EmphasisNode node) { Write("<span"); if (node.Class != null) { Write(" class=\"", ToIdentifier(node.Class), "\""); } Write(">"); JoinChildren(node, " "); Write("</span>"); }
public void Emphasis_matches_base_case() { var expected = new EmphasisNode( new IInlineNode[] { new TextNode("text", new SourceRange(1, 4, 1, 1)) }, new SourceRange(0, 6, 1, 0) ); var match = EmdGrammar.RichEmphasis.ShouldMatchAllOf("*text*"); match.Succeeded.Should().BeTrue(); match.Product.ShouldBeEquivalentTo(expected); }
public abstract void VisitEmphasis(EmphasisNode node);