Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| doc:linebreaks_spacing [2026/03/30 18:01] – [At the end of a line] Simon Grant | doc:linebreaks_spacing [2026/03/31 06:09] (current) – Simon Grant | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| //part of the [[start|GtC documentation]]// | //part of the [[start|GtC documentation]]// | ||
| - | ====== Linebreaks and spacing | + | ====== Linebreaks and spaces |
| //Try out all these techniques below in the [[playground: | //Try out all these techniques below in the [[playground: | ||
| Line 16: | Line 16: | ||
| * Markdown lists **do** need blank lines before | * Markdown lists **do** need blank lines before | ||
| * both should have blank lines after them | * both should have blank lines after them | ||
| - | * Blank lines are needed before Markdown-style headings: no harm in having them in any case | + | * Blank lines are needed before Markdown-syntax |
| ===== Blank spaces ===== | ===== Blank spaces ===== | ||
| - | In particular, at the beginning or end of lines. They don't matter usually in the middle of text. | + | These make a difference, in particular |
| ==== In the middle of text ===== | ==== In the middle of text ===== | ||
| + | I can put in many spaces without | ||
| - | I can put in many spaces without | + | I can put in many spaces without |
| Of course, they do matter when you are expressly wanting them, as with `< | Of course, they do matter when you are expressly wanting them, as with `< | ||
| - | `< | + | |
| + | comes out as < | ||
| and exactly the same for `< | and exactly the same for `< | ||
| but also when the line starts with two or more spaces: | but also when the line starts with two or more spaces: | ||
| Line 42: | Line 44: | ||
| MediaWiki is also picky about spaces starting lines. | MediaWiki is also picky about spaces starting lines. | ||
| - | ==== At the end of a line ==== | + | ==== At the end of a line; and linebreaks |
| - | Here it's the other way round. Native DokuWiki doesn' | + | Here it's the other way round. Native DokuWiki doesn' |
| - | But Markdown does. | + | But Markdown does, and so, with our Markdown plugin, it does matter. |
| Any line with two or more spaces at the end causes a linebreak. | Any line with two or more spaces at the end causes a linebreak. | ||
| Even for short lines. | Even for short lines. | ||
| Like these above. | Like these above. | ||
| + | |||
| + | ``` | ||
| + | While Markdown breaks lines if there are spaces at the end, DokuWiki breaks lines explicitly | ||
| + | when there are double backslashes `\\` at the end\\ | ||
| + | or before a space.\\ | ||
| + | Like this\\ and this\\ and this\\ | ||
| + | up to here. | ||
| + | ``` | ||
| + | |||
| + | While Markdown breaks lines if there are spaces at the end, DokuWiki breaks lines explicitly | ||
| + | when there are double backslashes `\\` at the end\\ | ||
| + | or before a space.\\ | ||
| + | Like this\\ and this\\ and this\\ | ||
| + | up to here. | ||
| + | |||
| + | As these two conventions don't conflict, both of them work here. | ||