Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006340OCamlOCamldocpublic2014-03-06 16:402014-09-15 11:10
Reporterdra 
Assigned Toguesdon 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version4.01.0 
Target Version4.02.2+devFixed in Version 
Summary0006340: Incorrect handling of \r when processing "Windows" source files
Descriptionocamldoc doesn't correctly handle Windows line endings (\r\n) in comments - resulting HTML files contain \r\r\n. This shows up in code blocks as spurious blank lines.
Steps To ReproduceCreate Broken.mli (using Windows line-endings) and run ocamldoc -html -stars Broken.mli

(**
 * This will be broken by ocamldoc.
 * It seems unable to cope with DOS line endings.
 * {[let foo = "bar"
 *in
 * "fu" ^ foo]}
 *)

val foo : unit
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0012129)
doligez (administrator)
2014-09-15 09:55

Arguably, your HTML renderer is also broken: it shouldn't take a single \r as an end-of-line.
(0012133)
dra (reporter)
2014-09-15 11:10
edited on: 2014-09-15 11:10

Well, possibly, but by HTML renderer you're referring to Internet Explorer 11, Chrome 37 and Firefox 27 (I know that's out-of-date - I don't use it very often!). Interestingly, as I also have a not-updated Ubuntu 12.4 virtual machine, Firefox 27 appears to ignore the extra \r on Linux, but not on Windows.
Technically (http://www.w3.org/TR/html401/struct/text.html#line-breaks [^]), both are behaving correctly - \r\r\n is two line breaks (or three, depending on how you read it!) and a pre element's rendering of whitespace is all covered by "may"! What SGML parsing has to say about mixed line break use, I don't know, because it's of course an ISO standard and I'm not wealthy enough to be able to consult it!


- Issue History
Date Modified Username Field Change
2014-03-06 16:40 dra New Issue
2014-03-06 16:40 dra Status new => assigned
2014-03-06 16:40 dra Assigned To => guesdon
2014-07-16 18:25 doligez Target Version => 4.02.1+dev
2014-09-04 00:25 doligez Target Version 4.02.1+dev => undecided
2014-09-15 09:55 doligez Note Added: 0012129
2014-09-15 09:55 doligez Target Version undecided => 4.02.2+dev
2014-09-15 11:10 dra Note Added: 0012133
2014-09-15 11:10 dra Note Edited: 0012133 View Revisions


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker