php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47242 No newlines when c'n'p-ing examples from IE/CHM with the new Geshi highlighter.
Submitted: 2009-01-29 18:14 UTC Modified: 2009-11-20 11:35 UTC
From: RQuadling at GMail dot com Assigned: cweiske (profile)
Status: Closed Package: Doc Build problem
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
27 + 45 = ?
Subscribe to this entry?

 
 [2009-01-29 18:14 UTC] RQuadling at GMail dot com
Description:
------------
Ok, so this is going to be WAY down at the bottom of someone's list, 
if at all.

But, here goes ...

Using phd with the new --highlighter option to use GeSHi with the 
html, php and chm themes.

If you cut and paste an example from the rendered output to your 
editor, it has lost its line breaks.

This is only visible when using Internet Explorer or the windows CHM 
viewer (which is essentially a contained IE).

Using Chrome with the html and php output is fine.

Using the normal highlighter is also fine in IE/Chrome/CHM with 
html/php/chm themes.


Adding this line ...

        $geshi->set_header_type(GESHI_HEADER_DIV);

to the highlight() function in the new PhD_Highlighter_Geshi.php 
class solves this.

Expected result:
----------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>Example</title>
    </head>
    <body>

        <?php
            echo "Hi, I'm a PHP script!";
        ?>

    </body>
</html> 





Actual result:
--------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"    
"http://www.w3.org/TR/html4/loose.dtd"><html>    <head>        
<title>Example</title>    </head>    <body>         <?php            
echo "Hi, I'm a PHP script!";        ?>     </body></html>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-20 10:56 UTC] svn@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=291060
Log: Copy newlines (bug #47242)
 [2009-11-20 10:57 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 15:01:28 2024 UTC