Esempio n. 1
0
 /**
  * Visit the paragraph mode.
  *
  * @param T_Text_Paragraph $node
  */
 function visitTextParagraph(T_Text_Paragraph $node)
 {
     // inside a paragraph, all newlines should be converted to <br /> tags.
     $this->f_swap_space = $this->filter;
     $this->filter = new T_Filter_EolToBr($this->filter);
     // render content
     $this->xhtml .= EOL . '<p>' . $node->getContent($this->filter);
     $this->registerForPostMethod($node);
 }
Esempio n. 2
0
 function testThatContentInsideParagraphClassRemainsUnchanged()
 {
     $element = new T_Text_Paragraph("no\n\nchange");
     $element->accept(new T_Text_ParagraphLexer());
     $this->assertSame("no\n\nchange", $element->getContent());
 }