You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6340 Reporter:@dra27 Assigned to:@damiendoligez Status: closed (set by @damiendoligez on 2015-03-25T01:16:17Z) Resolution: fixed Priority: normal Severity: minor Version: 4.01.0 Target version: 4.02.2+dev / +rc1 Fixed in version: 4.03.0+dev / +beta1 Category: ocamldoc
Bug description
ocamldoc 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 reproduce
Create 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
The text was updated successfully, but these errors were encountered:
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!
OK, so it's HTML itself that is broken. I'm not surprised.
FTR, now that MacOS 9 has disappeared, the correct way to handle this CR/LF nonsense is to consider that LF is a newline, and CR is utterly ignored in all contexts. That works with both Unix and Windows.
I've committed a fix to trunk (rev 15815), but I still need to test it for real under Windows.
Original bug ID: 6340
Reporter: @dra27
Assigned to: @damiendoligez
Status: closed (set by @damiendoligez on 2015-03-25T01:16:17Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.01.0
Target version: 4.02.2+dev / +rc1
Fixed in version: 4.03.0+dev / +beta1
Category: ocamldoc
Bug description
ocamldoc 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 reproduce
Create Broken.mli (using Windows line-endings) and run ocamldoc -html -stars Broken.mli
(**
*in
*)
val foo : unit
The text was updated successfully, but these errors were encountered: