void Insert(Token.Comment commentToken) { if (commentToken.IsBogus) { var comment = HtmlProcessingInstruction.Create(doc, commentToken); InsertNode(comment); } else { var comment = doc.CreateComment(commentToken.Data); InsertNode(comment); } }
public override void Read(Tokeniser t, CharacterReader r) { // TODO: handle bogus comment starting from eof. when does that trigger? // rewind to capture char that lead us here r.Unconsume(); Token.Comment comment = new Token.Comment(); comment.data.Append(r.ConsumeTo('>')); comment.IsBogus = true; // TODO: replace nullChar with replaceChar t.Emit(comment); t.AdvanceTransition(Data); }
public void CreateCommentPending() { commentPending = new Token.Comment(); }