tag:blogger.com,1999:blog-3803541356848955053.post1865296869975787314..comments2016-05-06T18:44:33.019-07:00Comments on YJL: Hg/Git diff says “No newline at end of file”Yu-Jie Linhttps://plus.google.com/115422682039760465813[email protected]Blogger1125tag:blogger.com,1999:blog-3803541356848955053.post-35131582251660196072013-10-10T16:21:38.679-07:002013-10-10T16:21:38.679-07:00I found this entry while looking for whether EOLs ...I found this entry while looking for whether EOLs at the end of, specifically, HTML document files are valid HTML. Here's the relevant link to HTML5 as of today, 2013-10-10 Z, which currently points to a page of the HTML5 "W3C Candidate Recommendation 6 August 2013": http://www.w3.org/TR/html5/syntax.html#writing (HTML5 section 8.1 "Writing HTML documents", until start of section 8.1.1 "The DOCTYPE")<br /><br />It lists the allowed structure of a HTML file's contents; the last point, numbered 6, also allows "Any number of [...] space characters."; the definition of those includes regular blanks U+0020, as well as both U+000A (LF) and U+000D (CR), among others. This point 6 specifies what is allowed to occur after a document's closing tag of the root (html) element.<br /><br />Interestingly, apparently standard C specifies that any C language source code file which isn't empty not only is allowed to but rather "shall" end in an EOL, as described here: http://gcc.gnu.org/ml/gcc/2003-11/msg01568.html (referencing ISO C90 (also C99) section 5.1.1.2, based on ANSI C89 section 2.1.1.2; point 2)Ell Dee[email protected]