doc:linebreaks_spacing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:linebreaks_spacing [2026/03/30 17:52] Simon Grantdoc: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:playground]].// //Try out all these techniques below in the [[playground: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 headings: no harm in having them before and after headings in any case
  
 ===== 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 differencein particular at the beginning or end of lines. They don't matter usually in the middle of text.
  
 ==== In the middle of text ===== ==== In the middle of text =====
 +  I can put in      many      spaces without      altering the way the text is displayed.
  
-I can put in      many spaces without      altering the way the text is shown.+I can put in      many      spaces without      altering the way the text is displayed.
  
 Of course, they do matter when you are expressly wanting them, as with `<code>` sections: Of course, they do matter when you are expressly wanting them, as with `<code>` sections:
  
-`<code>   b c   de    f</code>comes out as <code>   b c   de    f</code>+  <code>   b c   de    f</code> 
 +comes out as <code>   b c   de    f</code>
 and exactly the same for `<file>`: <file>   b c   de    f</file> and exactly the same for `<file>`: <file>   b c   de    f</file>
 but also when the line starts with two or more spaces: but also when the line starts with two or more spaces:
Line 36: Line 38:
 ==== At the start of a line ==== ==== At the start of a line ====
 In DokuWiki, there must normally be no blank spaces at the start of a line, unless In DokuWiki, there must normally be no blank spaces at the start of a line, unless
-  - you want it to be formatted as code +  - you want it to be formatted as code (see above) 
-  - you want to create a list (see [[lists]])+  - you want to create a list where the number of spaces links to how deep the list item is (see [[lists]]) 
 + 
 +and here on this wiki, which is based in DokuWiki, the Markdown rules don't apply. 
 +MediaWiki is also picky about spaces starting lines. 
 + 
 +==== At the end of a line; and linebreaks ==== 
 +Here it's the other way round. Native DokuWiki doesn't care if there are extra spaces at the end of a line. 
 +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.   
 +Even for short lines.       
 +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.
  • doc/linebreaks_spacing.1774893179.txt.gz
  • Last modified: 2026/03/30 17:52
  • by Simon Grant