Modify ↓
#1762 closed defect (fixed)
Windows line endings break PHP highlighting
| Reported by: | Owned by: | Matthew Good | |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.9 |
| Component: | version control/browser | Version: | devel |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
This is the trac view for this file.
Only the first line is displayed in the trac view.
Attachments (0)
Change History (6)
comment:1 by , 20 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 20 years ago
| Owner: | changed from to |
|---|
I'll try to reproduce the problem… You are using PHP for syntax highlighting, but which PHP version is it?
comment:3 by , 20 years ago
| Owner: | changed from to |
|---|---|
| Status: | assigned → new |
oops, sorry, concurrent edit :)
comment:4 by , 20 years ago
| Milestone: | → 0.9 |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
| Summary: | PHP in source view doesn't display correctly → WIndows line endings break PHP highlighting |
This has been fixed in [1918]
comment:5 by , 20 years ago
| Summary: | WIndows line endings break PHP highlighting → Windows line endings break PHP highlighting |
|---|
comment:6 by , 20 years ago
The PHP version is # php -v PHP 5.1.0b2 (cli) (built: Jul 7 2005 23:18:22) Copyright © 1997-2005 The PHP Group Zend Engine v2.1.0b2, Copyright © 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.