Browse Source

docs: stop talking about using tabs for indent levels

Continue to mention that Markdown expands all tabs to spaces
before doing anything else and that it guarantees to expaned
tabs withing ```-delimited code blocks to 8-character tab-stop
positions.

Otherwise always talk about "indent" levels in terms of 4
spaces per level.

There is far too much Markdown content in existence already
that assumes indenting by 4 spaces gives a new indent level.

That does not necessarily imply that all the creators of these
documents have incorrectly attempted to alter the hard-coded
terminal physical tab-stop settings from the fixed value of 8
to something else that the docs seemed to imply was 4.

Users with some other tab-stop setting were left out in the
cold by the docs.  In particular, a tab-stop setting of 3 would
have rendered the examples completely useless and the text just
plain wrong.

With this change the docs no longer assume anything in particular
about the user's tab-stop settings.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
master
Kyle J. McKay 8 years ago
parent
commit
07852b3417
  1. 20
      basics.md
  2. 24
      syntax.md

20
basics.md

@ -32,11 +32,10 @@ can [see the source for it by adding `.md` to the URL] [src].
## Paragraphs, Headers, Blockquotes ##
A paragraph is simply one or more consecutive lines of text, separated
by one or more blank lines. (A blank line is any line that looks like
by one or more blank lines. (A blank line is any line that looks like
a blank line -- a line containing nothing but spaces or tabs is
considered blank.) Normal paragraphs should not be indented with
spaces or tabs. Note that Markdown expands all tabs to spaces using
tabstops set at 4 spaces apart. It performs this expansion before
considered blank.) Normal paragraphs should not be indented with
spaces or tabs. Note that Markdown expands all tabs to spaces before
doing anything else.
Markdown offers two styles of headers: *Setext* and *atx*.
@ -175,7 +174,7 @@ Output:
If you put blank lines between items, you'll get `<p>` tags for the
list item text. You can create multi-paragraph list items by indenting
the paragraphs by 4 spaces or 1 tab:
the paragraphs by 4 spaces:
* A list item.
@ -292,8 +291,8 @@ Output:
To specify an entire block of pre-formatted code, indent every line of
the block by 4 spaces or 1 tab. Just like with code spans, `&`, `<`,
and `>` characters will be escaped automatically.
the block by 4 spaces. Just like with code spans, `&`, `<`, and `>`
characters will be escaped automatically.
Alternatively an entire block of pre-formatted code may be preceded with a
line consisting of 3 backtick quotes (or more) and followed by a line
@ -301,10 +300,9 @@ consisting of the same number of backtick quotes -- in which case the code
itself does not need to be additionally indented. The first line may
optionally have a syntax specifier (e.g. sh, c, perl, etc.) appended.
Note also that any physical tab characters within a 3-backtick-quotes,
non-indented code block are always expanded correctly to 8-character tab-stop
positions (which differs from the 4-character positions used in the rest of a
markdown file). This is to facilitate simple copy-and-paste to include code
snippets.
non-indented code block are *always* expanded correctly to 8-character
tab-stop positions. This is to facilitate simple copy-and-paste to include
code snippets.
Markdown:

24
syntax.md

@ -183,11 +183,10 @@ and `&` in your example code needs to be escaped.)
<h3 id="p">Paragraphs and Line Breaks</h3>
A paragraph is simply one or more consecutive lines of text, separated
by one or more blank lines. (A blank line is any line that looks like a
by one or more blank lines. (A blank line is any line that looks like a
blank line -- a line containing nothing but spaces or tabs is considered
blank.) Normal paragraphs should not be indented with spaces or tabs.
Note that Markdown expands all tabs to spaces using tabstops set at 4
spaces apart. It performs this expansion before doing anything else.
blank.) Normal paragraphs should not be indented with spaces or tabs.
Note that Markdown expands all tabs to spaces before doing anything else.
The implication of the "one or more consecutive lines of text" rule is
that Markdown supports "hard-wrapped" text paragraphs. This differs
@ -373,8 +372,7 @@ list with the number 1. At some point in the future, Markdown may support
starting ordered lists at an arbitrary number.
List markers typically start at the left margin, but may be indented by
up to three spaces. List markers must be followed by one or more spaces
or a tab.
up to three spaces. List markers must be followed by one or more spaces.
To make lists look nice, you can wrap items with hanging indents:
@ -419,8 +417,7 @@ will turn into:
</ul>
List items may consist of multiple paragraphs. Each subsequent
paragraph in a list item must be indented by either 4 spaces
or one tab:
paragraph in a list item must be indented by 4 spaces:
1. This is a list item with two paragraphs. Lorem ipsum dolor
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
@ -453,7 +450,7 @@ delimiters need to be indented:
> inside a list item.
To put a code block within a list item, the code block needs
to be indented *twice* -- 8 spaces or two tabs:
to be indented *twice* (in other words 8 spaces):
* A list item with a code block:
@ -480,8 +477,8 @@ of a code block are interpreted literally. Markdown wraps a code block
in both `<pre>` and `<code>` tags.
To produce a code block in Markdown, simply indent every line of the
block by at least 4 spaces or 1 tab. Alternatively precede the block with
a line consisting of 3 backtick quotes (or more) and follow it with a
block by at least 4 spaces. Alternatively precede the block with a
line consisting of 3 backtick quotes (or more) and follow it with a
line consisting of the same number of backtick quotes -- in this case the
code lines themselves do not require any additional indentation.
For example, given this input:
@ -507,9 +504,8 @@ Markdown will generate:
Note that when using the 3 backtick quotes technique, the blank line
before the start of the code block is optional. One level of
indentation -- 4 spaces or 1 tab -- is removed from each
line of the code block unless the 3 backtick quotes are used.
For example, this:
indentation -- 4 spaces -- is removed from each line of the code block
unless the 3 backtick quotes are used. For example, this:
Here is an example of AppleScript:

Loading…
Cancel
Save