From: Ilia Alshanetsky Date: Wed, 11 Aug 2004 22:38:31 +0000 (+0000) Subject: Fixed bug #29607 (highlighting code with HEREDOC produces invalid output). X-Git-Tag: php-5.0.1RC2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e5c01290d4afcfb13e96494e2dfcf4b00975a37;p=php Fixed bug #29607 (highlighting code with HEREDOC produces invalid output). --- diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c index da74069b55..dbd0fcc75d 100644 --- a/Zend/zend_highlight.c +++ b/Zend/zend_highlight.c @@ -159,6 +159,12 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini switch (token_type) { case T_END_HEREDOC: zend_html_puts(token.value.str.val, token.value.str.len TSRMLS_CC); + { + char *ptr = LANG_SCNG(yy_text); + if (ptr[LANG_SCNG(yy_leng) - 1] != ';') { + zend_html_putc('\n'); + } + } break; default: zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC);