public override Node parse(BlockParser parser) { var childLines = new List <string>(); // Eat until we hit a blank line. while (!parser.isDone && !parser.matches(BlockParser._emptyPattern)) { childLines.Add(parser.current); parser.advance(); } return(new TextNode(childLines.join("\n"))); }
public override Node parse(BlockParser parser) { var childLines = new List <string>(); // Eat until we hit [endPattern]. while (!parser.isDone) { childLines.Add(parser.current); if (parser.matches(_endPattern)) { break; } parser.advance(); } parser.advance(); return(new TextNode(childLines.join("\n"))); }