3 ms·
I'd just like to take a moment to mention Nested Comments. Oh if I had a £1 for every time I'd had to sift through lines and lines of code, because I can't jus
by TheAnimus 14y ago
I'd just like to take a moment to mention Nested Comments.
Oh if I had a £1 for every time I'd had to sift through lines and lines of code, because I can't just comment an element. I just can't comprehend why they'd need to reserve -- inside a comment.
- masklinn 14y ago> I just can't comprehend why they'd need to reserve -- inside a comment. It's because the feature was inherited from SGML, first for commenting in element declarations (e.g. <!ELEMENT -- this is an element>) and then generalized to the whole document: in SGML, the grammar for a comment is comment declaration = MDO ("<!"), (comment, ( s | comment )* )?, MDC (">") comment = COM ("--"), SGML character*, COM ("--") HTML — as an SGML application — theoretically inherited this feature (most UA don't really implement it correctly so it's not exactly safe to use sequences of dashes inside a comment, browsers may or may not toggle commenting). See http://www.howtocreate.co.uk/SGMLComments.html http://www.howtocreate.co.uk/SGMLComments.html for a more extensive explanation especially in relation to browsers (SGML-compliant comments handling used to be part of early ACID2, before being removed because it was a stupid idea) Meanwhile XML took half of it, threw the rest away, and called it a day.