Пример #1
0
        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);
        }
Пример #2
0
 public override void VisitEmphasis(EmphasisNode node)
 {
     Write("<span");
     if (node.Class != null)
     {
         Write(" class=\"", ToIdentifier(node.Class), "\"");
     }
     Write(">");
     JoinChildren(node, " ");
     Write("</span>");
 }
Пример #3
0
        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);
        }
Пример #4
0
 public abstract void VisitEmphasis(EmphasisNode node);