Help:Newlines and spaces
From Eugene Neighbors
{{#if: Help|{{#if:|Other languages:}} Template:H-langs:
{{#if: Help||}}|{{#if:|Other languages:}} Template:H-langs: {{#if: Help||}}}}
In the case of one or more newlines at the start of a page, this number is reduced by one on every edit. Thus just pressing edit and save changes the page; this can be repeated, until no newline is left.
Newlines at the end are deleted right away on saving.
Deletion is prevented by adding on the first or last line, respectively.
Spaces and newlines are stripped from the start and end of parameter values of named parameters, but not of unnamed parameters! This is probably a bug. Compare conditional whitespace.
Examples using Template:Links-core with a parameter which consists of some spaces or two newlines:
{{t0| }}
gives
start- -end
{{t0|
}}
gives
start-
-end.
{{t0|1= }}
gives
start--end
{{t0|1=
}}
gives
start--end.
{{#if: Help|{{#if: Help|Template:Ph:Newlines and spaces}}
[edit] Links to other help pages
- Help contents (all help pages)
- Meta | Wikinews | Wikipedia | Wikiquote | Wiktionary | commons: | mw: | b: | s:
- Versions of this help page (for other languages see below)
- Meta | Wikinews | {{#if:|{{#if:Wikipedia|Wikipedia|w:Help:Newlines_and_spaces#}}|{{#if:Wikipedia|Wikipedia|w:Help:Newlines_and_spaces}}}} | Wikiquote | Wiktionary
- Links to this page from Meta (int) Meta (ext) Wikipedia MediaWiki
- Reading
- Go | Search | Stop words | URL | Namespace | Page name | Section
- Backlinks | Link | Piped link | Interwiki link | Redirect | Category | Image page
- Logging in and preferences
- Logging in | Preferences | User style
- Editing
- Advanced editing | Editing FAQ | Editing toolbar | Export | Import
- Editing tips and tricks | Editing shortcuts
- Tracking changes
- Recent changes (enhanced) | Related changes | Watching pages | Diff
- Page history | Edit summary | User contributions | Minor edit | Patrolled edit
- Style & formatting
- Wikitext examples | Wikitext reference | Reference card
- HTML in wikitext | HTML elements
- List | Table | Sorting
- Special input and output
- Inputbox | Special characters | Displaying a formula | Images and other uploaded files | EasyTimeline
- Advanced functioning
- Template | Advanced templates | Parser function | ParserFunctions | Parameter default | Variable | Magic word | System message | Substitution
- Array | Calculation
- Page management
- Starting a new page | Renaming (moving) a page | Maintenance | Merging and moving pages | Protecting pages
- Resolving disputes | Deleting a page
- Special pages
- Talk page | Testing | Sandbox
- Lists of resources
- Lists of Categories | Copyrights | Infobox
- Redirect | Reference Desk | Shortcuts | Stub types
Other languages: Template:H-langs:Newlines and spaces |{{#if: Help|Template:Ph:Newlines and spaces}}
[edit] Links to other help pages
- Help contents (all help pages)
- Meta | Wikinews | Wikipedia | Wikiquote | Wiktionary | commons: | mw: | b: | s:
- Versions of this help page (for other languages see below)
- Meta | Wikinews | {{#if:|{{#if:Wikipedia|Wikipedia|w:Help:Newlines_and_spaces#}}|{{#if:Wikipedia|Wikipedia|w:Help:Newlines_and_spaces}}}} | Wikiquote | Wiktionary
- Links to this page from Meta (int) Meta (ext) Wikipedia MediaWiki
- Reading
- Go | Search | Stop words | URL | Namespace | Page name | Section
- Backlinks | Link | Piped link | Interwiki link | Redirect | Category | Image page
- Logging in and preferences
- Logging in | Preferences | User style
- Editing
- Advanced editing | Editing FAQ | Editing toolbar | Export | Import
- Editing tips and tricks | Editing shortcuts
- Tracking changes
- Recent changes (enhanced) | Related changes | Watching pages | Diff
- Page history | Edit summary | User contributions | Minor edit | Patrolled edit
- Style & formatting
- Wikitext examples | Wikitext reference | Reference card
- HTML in wikitext | HTML elements
- List | Table | Sorting
- Special input and output
- Inputbox | Special characters | Displaying a formula | Images and other uploaded files | EasyTimeline
- Advanced functioning
- Template | Advanced templates | Parser function | ParserFunctions | Parameter default | Variable | Magic word | System message | Substitution
- Array | Calculation
- Page management
- Starting a new page | Renaming (moving) a page | Maintenance | Merging and moving pages | Protecting pages
- Resolving disputes | Deleting a page
- Special pages
- Talk page | Testing | Sandbox
- Lists of resources
- Lists of Categories | Copyrights | Infobox
- Redirect | Reference Desk | Shortcuts | Stub types
Other languages: Template:H-langs:Newlines and spaces }}
