Modify ↓
Ticket #1762 (closed defect: fixed)
Opened 7 years ago
Last modified 5 years ago
Windows line endings break PHP highlighting
| Reported by: | Markus Tacker <m@…> | Owned by: | mgood |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.9 |
| Component: | version control/browser | Version: | devel |
| Severity: | normal | Keywords: | |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
This is the trac view for this file.
Only the first line is displayed in the trac view.
Attachments
Change History
comment:1 Changed 7 years ago by mgood
- Owner changed from jonas to mgood
- Status changed from new to assigned
comment:2 Changed 7 years ago by cboos
- Owner changed from mgood to cboos
I'll try to reproduce the problem...
You are using PHP for syntax highlighting, but which PHP version is it?
comment:3 Changed 7 years ago by cboos
- Owner changed from cboos to mgood
- Status changed from assigned to new
oops, sorry, concurrent edit :)
comment:4 Changed 7 years ago by mgood
- Milestone set to 0.9
- Resolution set to fixed
- Status changed from new to closed
- Summary changed from PHP in source view doesn't display correctly to WIndows line endings break PHP highlighting
This has been fixed in [1918]
comment:5 Changed 7 years ago by trac@…
- Summary changed from WIndows line endings break PHP highlighting to Windows line endings break PHP highlighting
comment:6 Changed 7 years ago by Markus Tacker <m@…>
The PHP version is
# php -v
PHP 5.1.0b2 (cli) (built: Jul 7 2005 23:18:22)
Copyright (c) 1997-2005 The PHP Group
Zend Engine v2.1.0b2, Copyright (c) 1998-2004 Zend Technologies
Note: See
TracTickets for help on using
tickets.



Well, this seems to be a case of the PHP highlighter behaving stupidly. If the file contains Windows CRLF line endings it removes the CR (replacing it with a <br /> for the HTML), but it leaves all the LF characters. I'll provide a workaround, but it seems like PHP should either leave the line endings wholly intact, or remove them completely.