Help talk:Whitespace
{{WikiProject banner shell|
{{Wikipedia Help Project|class=NA|importance=top}}
}}
Spaces between text and comment
The section "Invisible comments", written by SchmuckyTheCat and Redrose64 in about 2011, tells editors to remove whitespace between text and an HTML comment (i.e invisible comment:
:You can't delete the whole section. This still produces whitespace if there are two newlines between text and a comment. This is extremely common when editors comment out a paragraph of uncited text.
:Templates interact in weird ways with leading and/or trailing comments. Leaving no spaces (especially a newline) at the beginning and end of a template is still good advice.
:There's no objective goal in removing this advice other than source beautification. Remember that Wikipedia isn't the only project that uses Wikipedia's source. Since this appears to be a change in MediaWiki behavior translating wiki source to html, we don't know the impact of this on other downlevel projects with different/older rendering engines. Best to leave the advice as is, rather than make the source look clean at the expense of the output looking dirty downstream.
:SchmuckyTheCat (talk) 00:56, 26 August 2023 (UTC)
:When I wrote {{diff|Help:Whitespace|prev|457517789|this}}, the direct caution was against the markup
The beginning of a paragraph ... that is: text, two newlines, a comment, two newlines and text. If you use markup like that, as {{oldid|Wikipedia:Sandbox|1172396256|here}}, you still get an extra-broad gap between paragraphs: the behaviour has not changed in twelve years. --Redrose64 🌹 (talk) 20:29, 26 August 2023 (UTC)