improve markdown.md
Move notes about HTML elements to the top. Align the "<=== no thank you" notices. Say please more. :-) Fixed a few minor nits.
This commit is contained in:
1 parent
31f3385a34
commit
ba80b35457
2 files changed
+205
-196
No files matched your search
+79
-73
@@ -390,8 +390,8 @@ See also <a href="https://spec.commonmark.org/current/">CommonMark Spec</a>.</p>
|
||||
Some these relate to use of markdown directly, others relate to injecting HTML
|
||||
into the markdown file.</p>
|
||||
<p>In particular there are things we ask people to please do <strong>NOT</strong> use in
|
||||
markdown files:</p>
|
||||
<h2 id="do-not-use-name-attributes-in-html-a-tags">Do NOT use name attributes in HTML a tags</h2>
|
||||
markdown files for the IOCCC:</p>
|
||||
<h2 id="please-do-not-use-name-attributes-in-html-a-..-hyperlink-elements">Please do NOT use name attributes in HTML <code><a ..></code> hyperlink elements</h2>
|
||||
<p>Please do <strong>NOT</strong> use the HTML construct:</p>
|
||||
<pre><code> <a name="string">...</a> <=== no thank you</code></pre>
|
||||
<p>as those are <strong>NOT</strong> part of the HTML 5 standard.</p>
|
||||
@@ -401,80 +401,33 @@ markdown files:</p>
|
||||
encapsulates the HTML you want to name: i.e., the target of some
|
||||
<code><a href="#string"></code> or some other <code><a href="URL#string"></code>
|
||||
for the given page URL.</p>
|
||||
<p>There are certain HTML Elements that cannot have internal <code><div id="string">...</div></code>. For example you cannot do this:</p>
|
||||
<pre><code> # <div id="string">This will NOT work</div></code></pre>
|
||||
<p>There are certain HTML Elements that cannot have internal <code><div id="string">...</div></code>.</p>
|
||||
<p>For example:</p>
|
||||
<pre><code> # <div id="string">THIS WILL NOT WORK!</div> <=== this will not work</code></pre>
|
||||
<p>For things like headings, you have to surround them as in:</p>
|
||||
<pre><code> <div id="string">
|
||||
# This will work
|
||||
</div></code></pre>
|
||||
<p>While some browsers will still recognize the HTML construct <code><a name="string">...</a></code>, it is possible they might NOT in the future.</p>
|
||||
<h2 id="do-not-use-trailing-backslash-outside-of-a-code-block">Do NOT use trailing backslash outside of a code block</h2>
|
||||
<p>Unless the line is inside a markdown code block, please do <strong>NOT</strong>
|
||||
end a markdown line with a trailing backslash (<code>\</code>). Instead use
|
||||
a trailing <code><br></code>.</p>
|
||||
<p>Instead of:</p>
|
||||
<pre><code> In markdown,\ <=== no thank you
|
||||
do NOT use trailing\
|
||||
backslashes outside of\
|
||||
a code block</code></pre>
|
||||
<p>use:</p>
|
||||
<pre><code> In markdown,<br>
|
||||
use trailing<br>
|
||||
br's outside of<br>
|
||||
a code block</code></pre>
|
||||
<p>Again, use of a trailing backslash (<code>\</code>) inside a markdown code block is fine:</p>
|
||||
<pre><code>```
|
||||
This is OK\
|
||||
inside a\
|
||||
markdown code\
|
||||
block
|
||||
```</code></pre>
|
||||
<p>This will prevent <code>pandoc(1)</code> from generating deprecated HTML elements such as
|
||||
<code><br /></code>.</p>
|
||||
<h2 id="do-not-use-markdown-image-elements">Do NOT use markdown image elements</h2>
|
||||
<p>Please do <strong>NOT</strong> use the markdown embedded image element.</p>
|
||||
<p>Instead of using this markdown element to embed an image:</p>
|
||||
<pre><code>  <=== no thank you</code></pre>
|
||||
<p>Use an <code>img</code> HTML element with <code>alt</code>, <code>width</code> and <code>length</code>
|
||||
attributes:</p>
|
||||
<pre><code> <img src="filename.png"
|
||||
alt="describe the filename.png image for someone who cannot view it"
|
||||
width=PIXEL_WIDTH height=PIXEL_HEIGHT></code></pre>
|
||||
<p>For example, instead of:</p>
|
||||
<pre><code>  <=== no thank you</code></pre>
|
||||
<p>use this HTML:</p>
|
||||
<pre><code> <img src="1984-anonymous-tattoo.jpg"
|
||||
alt="image of a tattoo of the 1984 anonymous C code"
|
||||
width=600 height=401></code></pre>
|
||||
<p>The problem goes beyond the fact that <code>pandoc(1)</code> generates problematic
|
||||
HTML from the markdown image construct, the resulting HTML does NOT
|
||||
have <code>width</code> and <code>height</code> information so browsers have to slow down
|
||||
on rendering text around the image until it can internally determine
|
||||
the image size.</p>
|
||||
<h2 id="do-not-use-markdown-style-horizontal-lines">Do NOT use markdown style horizontal lines</h2>
|
||||
<p>Please do <strong>NOT</strong> use <code>**---**</code>-style lines in markdown to create horizontal
|
||||
lines or to separate sections.</p>
|
||||
<p>Unless something is inside a markdown code block, do NOT start a
|
||||
line with 3 or more dashes (<code>-</code>s).</p>
|
||||
<p>Such causes <code>pandoc(1)</code> to generate <code><hr /></code>. The <code><hr /></code> has no effect in
|
||||
standard HTML 5 and interacts badly with unquoted attribute values.</p>
|
||||
<p>If a horizontal line is really needed, use:</p>
|
||||
<pre><code> <hr></code></pre>
|
||||
<p>If a short line is needed, use:</p>
|
||||
<pre><code> <hr style="width:10%;text-align:left;margin-left:0"></code></pre>
|
||||
<h2 id="do-not-use-the-strike-html-element">Do NOT use the strike HTML element</h2>
|
||||
<p>Please NOT use HTML elements:</p>
|
||||
<pre><code> <strike>...</strike> <=== no thank you</code></pre>
|
||||
<h2 id="please-do-not-use-the-strike-nor-s-html-element">Please do NOT use the <code><strike></code> nor <code><s></code> HTML element</h2>
|
||||
<p>Please NOT use the obsolete <code><strike></code> nor <code><s></code> (<del> <em>strikeout</em> </del>) HTML elements:</p>
|
||||
<pre><code> <strike>...</strike> <=== no thank you
|
||||
<s>...</s> <=== no thank you</code></pre>
|
||||
<p>Use instead:</p>
|
||||
<pre><code> <del>...</del></code></pre>
|
||||
<h2 id="do-not-use-the-tt-html-element">Do NOT use the <code><tt></code> HTML element</h2>
|
||||
<p>Please do <strong>NOT</strong> use the <code><tt></code> HTML elements:</p>
|
||||
<div class="sourceCode" id="cb16"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a> <span class="dt"><</span><span class="kw">tt</span><span class="dt">></span>The HTML 5 obsolete tt element is obsolete<span class="dt"></</span><span class="kw">tt</span><span class="dt">></span> <span class="er"><</span>=== no thank you</span></code></pre></div>
|
||||
<h2 id="please-do-not-use-the-u-html-element">Please do NOT use the <code><u></code> HTML element</h2>
|
||||
<p>Please NOT use the obsolete <code><u></code> (<ins><em>underline</em></ins>) HTML element:</p>
|
||||
<pre><code> <u>...</u> <=== no thank you</code></pre>
|
||||
<p>Use instead:</p>
|
||||
<pre><code> <ins>...</ins></code></pre>
|
||||
<h2 id="please-do-not-use-the-tt-html-element">Please do NOT use the <code><tt></code> HTML element</h2>
|
||||
<p>Please do <strong>NOT</strong> use the obsolete <code><tt></code> (<span style="font-family: monospace;"><em>teletype</em></span>) HTML element:</p>
|
||||
<pre><code> <tt>The obsolete tt element is obsolete</tt> <=== no thank you</code></pre>
|
||||
<p>Instead use either a monospaced span:</p>
|
||||
<div class="sourceCode" id="cb17"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a> <span class="dt"><</span><span class="kw">span</span><span class="ot"> style</span><span class="op">=</span><span class="st">"font-family: monospace;"</span><span class="dt">></span>Use of monospaced font is one option<span class="dt"></</span><span class="kw">span</span><span class="dt">></span></span></code></pre></div>
|
||||
<pre><code> <span style="font-family: monospace;">Use of monospaced font is one option</span></code></pre>
|
||||
<p>Or better and easier still, use an inline markdown code block:</p>
|
||||
<pre><code> `inline markdown code block is easier and much better`</code></pre>
|
||||
<h2 id="do-not-use-unindented-code-clocks">Do NOT use unindented code clocks</h2>
|
||||
<h2 id="please-do-not-use-code-blocks-that-are-not-indented">Please do NOT use code blocks that are NOT indented</h2>
|
||||
<p>Please do <strong>NOT</strong> start code blocks at the left-hand edge.</p>
|
||||
<pre><code>```
|
||||
This code block <=== no thank you
|
||||
@@ -496,7 +449,7 @@ those used in <code>next/rules.md</code> and in <code>next/guidelines.md</code>.
|
||||
| please_do_not_submit_this();
|
||||
}
|
||||
```</code></pre>
|
||||
<h2 id="do-not-add-trailing-slash-on-void-html-elements">Do NOT add trailing slash on void HTML elements</h2>
|
||||
<h2 id="please-do-not-add-trailing-slash-to-html-elements">Please do NOT add trailing slash to HTML elements</h2>
|
||||
<p>Please do <strong>NOT</strong> use a trailing slash on <a href="https://github.com/validator/validator/wiki/Markup-»-Void-elements">void HTML
|
||||
elements</a>.</p>
|
||||
<p>See also this note on <a href="https://github.com/validator/validator/wiki/Markup-»-Void-elements#trailing-slashes-in-void-element-start-tags-do-NOT-mark-the-start-tags-as-self-closing">trailing slashes in void-element start
|
||||
@@ -520,7 +473,61 @@ unquoted attribute values.</p>
|
||||
alt="image of a tattoo of the 1984 anonymous C code"
|
||||
width=600 height=401></code></pre>
|
||||
<p>etc.</p>
|
||||
<h2 id="do-not-end-markdown-links-in">Do NOT end markdown links in “))”</h2>
|
||||
<h2 id="please-do-not-use-trailing-backslash-outside-of-a-code-block">Please do NOT use trailing backslash outside of a code block</h2>
|
||||
<p>Unless the line is inside a markdown code block, please do <strong>NOT</strong>
|
||||
end a markdown line with a trailing backslash (<code>\</code>). Instead use
|
||||
a trailing <code><br></code>.</p>
|
||||
<p>Instead of:</p>
|
||||
<pre><code> In markdown,\ <=== no thank you
|
||||
do NOT use trailing\
|
||||
backslashes outside of\
|
||||
a code block</code></pre>
|
||||
<p>use:</p>
|
||||
<pre><code> In markdown,<br>
|
||||
use trailing<br>
|
||||
br's outside of<br>
|
||||
a code block</code></pre>
|
||||
<p>Again, use of a trailing backslash (<code>\</code>) inside a markdown code block is fine:</p>
|
||||
<pre><code>```
|
||||
This is OK\
|
||||
inside a\
|
||||
markdown code\
|
||||
block
|
||||
```</code></pre>
|
||||
<p>This will prevent <code>pandoc(1)</code> from generating deprecated HTML elements such as
|
||||
<code><br /></code>.</p>
|
||||
<h2 id="please-do-not-use-markdown-style-images">Please do NOT use markdown style images</h2>
|
||||
<p>Please do <strong>NOT</strong> use the markdown embedded image element.</p>
|
||||
<p>Instead of using this markdown element to embed an image:</p>
|
||||
<pre><code>  <=== no thank you</code></pre>
|
||||
<p>Use an <code><img ..></code> HTML element with <code>alt=</code>, <code>width=</code> and <code>length=</code>
|
||||
attributes:</p>
|
||||
<pre><code> <img src="filename.png"
|
||||
alt="describe the filename.png image for someone who cannot view it"
|
||||
width=PIXEL_WIDTH height=PIXEL_HEIGHT></code></pre>
|
||||
<p>For example, instead of:</p>
|
||||
<pre><code>  <=== no thank you</code></pre>
|
||||
<p>use this HTML:</p>
|
||||
<pre><code> <img src="1984-anonymous-tattoo.jpg"
|
||||
alt="image of a tattoo of the 1984 anonymous C code"
|
||||
width=600 height=401></code></pre>
|
||||
<p>The problem goes beyond the fact that <code>pandoc(1)</code> generates problematic
|
||||
HTML from the markdown image construct, the resulting HTML does NOT
|
||||
have <code>width</code> and <code>height</code> information so browsers have to slow down
|
||||
on rendering text around the image until it can internally determine
|
||||
the image size.</p>
|
||||
<h2 id="please-do-not-use-markdown-style-horizontal-lines">Please do NOT use markdown style horizontal lines</h2>
|
||||
<p>Please do <strong>NOT</strong> use <code>**---**</code>-style lines in markdown to create horizontal
|
||||
lines or to separate sections.</p>
|
||||
<p>Unless something is inside a markdown code block, do NOT start a
|
||||
line with 3 or more dashes (<code>-</code>s).</p>
|
||||
<p>Such causes <code>pandoc(1)</code> to generate <code><hr /></code>. The <code><hr /></code> has no effect in
|
||||
standard HTML 5 and interacts badly with unquoted attribute values.</p>
|
||||
<p>If a horizontal line is really needed, use:</p>
|
||||
<pre><code> <hr></code></pre>
|
||||
<p>If a short line is needed, use:</p>
|
||||
<pre><code> <hr style="width:10%;text-align:left;margin-left:0"></code></pre>
|
||||
<h2 id="please-do-not-end-markdown-links-in">Please do NOT end markdown links in “))”</h2>
|
||||
<p>Please do <strong>NOT</strong> end a markdown links with a double closed parenthesis “))”.</p>
|
||||
<p>Markdown links that end in “))” complicate parsing and sometimes lead
|
||||
to incorrect URLs or file paths.</p>
|
||||
@@ -532,7 +539,7 @@ to incorrect URLs or file paths.</p>
|
||||
<pre><code> This thing, ([some text](some/path)), is NOT ideal. <=== no thank you</code></pre>
|
||||
<p>Use:</p>
|
||||
<pre><code> This thing, [some text](some/path), is better.</code></pre>
|
||||
<h2 id="do-not-place-text-on-the-next-line-after-a-markdown-code-block">Do NOT place text on the next line after a markdown code block</h2>
|
||||
<h2 id="please-do-not-place-text-on-the-next-line-after-a-markdown-code-block">Please do NOT place text on the next line after a markdown code block</h2>
|
||||
<p>Please do <strong>NOT</strong> place text on the next line after a markdown code block.
|
||||
Instead, place a blank line after the end of a markdown code block
|
||||
as this makes it easier to detect when markdown code blocks are
|
||||
@@ -555,10 +562,9 @@ C compilers cannot be given a -Wno-main-arg-errors flag. <=== no than
|
||||
}
|
||||
```
|
||||
|
||||
C compilers cannot be given a -Wno-main-arg-errors flag.
|
||||
|
||||
BTW: note the blank line after the code block.</code></pre>
|
||||
<h2 id="do-not-put-s-or-s-in-markdown-link-titles">Do NOT put “(”s or “)”s in markdown link titles</h2>
|
||||
C compilers cannot be given a -Wno-main-arg-errors flag.</code></pre>
|
||||
<p><strong>BTW</strong>: Please note the blank line after the code block.</p>
|
||||
<h2 id="please-do-not-put-s-nor-s-in-markdown-link-titles">Please do NOT put “(”s nor “)”s in markdown link titles</h2>
|
||||
<p>Please do <strong>NOT</strong> use parenthesis inside the markdown link titles.</p>
|
||||
<p>Instead of:</p>
|
||||
<pre><code> [some (text)](https://example.com/cyrds) <=== no thank you</code></pre>
|
||||
|
||||
+126
-123
@@ -16,10 +16,10 @@ Some these relate to use of markdown directly, others relate to injecting HTML
|
||||
into the markdown file.
|
||||
|
||||
In particular there are things we ask people to please do **NOT** use in
|
||||
markdown files:
|
||||
markdown files for the IOCCC:
|
||||
|
||||
|
||||
## Do NOT use name attributes in HTML a tags
|
||||
## Please do NOT use name attributes in HTML `<a ..>` hyperlink elements
|
||||
|
||||
Please do **NOT** use the HTML construct:
|
||||
|
||||
@@ -41,10 +41,12 @@ encapsulates the HTML you want to name: i.e., the target of some
|
||||
for the given page URL.
|
||||
|
||||
There are certain HTML Elements that cannot have internal `<div
|
||||
id="string">...</div>`. For example you cannot do this:
|
||||
id="string">...</div>`.
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
# <div id="string">This will NOT work</div>
|
||||
# <div id="string">THIS WILL NOT WORK!</div> <=== this will not work
|
||||
```
|
||||
|
||||
For things like headings, you have to surround them as in:
|
||||
@@ -59,115 +61,13 @@ While some browsers will still recognize the HTML construct `<a
|
||||
name="string">...</a>`, it is possible they might NOT in the future.
|
||||
|
||||
|
||||
## Do NOT use trailing backslash outside of a code block
|
||||
## Please do NOT use the `<strike>` nor `<s>` HTML element
|
||||
|
||||
Unless the line is inside a markdown code block, please do **NOT**
|
||||
end a markdown line with a trailing backslash (`\`). Instead use
|
||||
a trailing `<br>`.
|
||||
|
||||
Instead of:
|
||||
|
||||
```
|
||||
In markdown,\ <=== no thank you
|
||||
do NOT use trailing\
|
||||
backslashes outside of\
|
||||
a code block
|
||||
```
|
||||
|
||||
use:
|
||||
|
||||
```
|
||||
In markdown,<br>
|
||||
use trailing<br>
|
||||
br's outside of<br>
|
||||
a code block
|
||||
```
|
||||
|
||||
Again, use of a trailing backslash (`\`) inside a markdown code block is fine:
|
||||
|
||||
````
|
||||
```
|
||||
This is OK\
|
||||
inside a\
|
||||
markdown code\
|
||||
block
|
||||
```
|
||||
````
|
||||
|
||||
This will prevent `pandoc(1)` from generating deprecated HTML elements such as
|
||||
`<br />`.
|
||||
|
||||
|
||||
## Do NOT use markdown image elements
|
||||
|
||||
Please do **NOT** use the markdown embedded image element.
|
||||
|
||||
Instead of using this markdown element to embed an image:
|
||||
|
||||
```
|
||||
 <=== no thank you
|
||||
```
|
||||
|
||||
Use an `img` HTML element with `alt`, `width` and `length`
|
||||
attributes:
|
||||
|
||||
```
|
||||
<img src="filename.png"
|
||||
alt="describe the filename.png image for someone who cannot view it"
|
||||
width=PIXEL_WIDTH height=PIXEL_HEIGHT>
|
||||
```
|
||||
|
||||
For example, instead of:
|
||||
|
||||
```
|
||||
 <=== no thank you
|
||||
```
|
||||
|
||||
use this HTML:
|
||||
|
||||
```
|
||||
<img src="1984-anonymous-tattoo.jpg"
|
||||
alt="image of a tattoo of the 1984 anonymous C code"
|
||||
width=600 height=401>
|
||||
```
|
||||
|
||||
The problem goes beyond the fact that `pandoc(1)` generates problematic
|
||||
HTML from the markdown image construct, the resulting HTML does NOT
|
||||
have `width` and `height` information so browsers have to slow down
|
||||
on rendering text around the image until it can internally determine
|
||||
the image size.
|
||||
|
||||
|
||||
## Do NOT use markdown style horizontal lines
|
||||
|
||||
Please do **NOT** use `**---**`-style lines in markdown to create horizontal
|
||||
lines or to separate sections.
|
||||
|
||||
Unless something is inside a markdown code block, do NOT start a
|
||||
line with 3 or more dashes (`-`s).
|
||||
|
||||
Such causes `pandoc(1)` to generate `<hr />`. The `<hr />` has no effect in
|
||||
standard HTML 5 and interacts badly with unquoted attribute values.
|
||||
|
||||
If a horizontal line is really needed, use:
|
||||
|
||||
```
|
||||
<hr>
|
||||
```
|
||||
|
||||
If a short line is needed, use:
|
||||
|
||||
```
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
```
|
||||
|
||||
|
||||
## Do NOT use the `<strike>` HTML element
|
||||
|
||||
Please NOT use HTML elements:
|
||||
Please NOT use the obsolete `<strike>` nor `<s>` (<del> _strikeout_ </del>) HTML elements:
|
||||
|
||||
```
|
||||
<strike>...</strike> <=== no thank you
|
||||
<s>...</s> <=== no thank you
|
||||
```
|
||||
|
||||
Use instead:
|
||||
@@ -177,9 +77,9 @@ Use instead:
|
||||
```
|
||||
|
||||
|
||||
## Do NOT use the `<u>` HTML element
|
||||
## Please do NOT use the `<u>` HTML element
|
||||
|
||||
Please NOT use HTML elements:
|
||||
Please NOT use the obsolete `<u>` (<ins>_underline_</ins>) HTML element:
|
||||
|
||||
```
|
||||
<u>...</u> <=== no thank you
|
||||
@@ -192,17 +92,17 @@ Use instead:
|
||||
```
|
||||
|
||||
|
||||
## Do NOT use the `<tt>` HTML element
|
||||
## Please do NOT use the `<tt>` HTML element
|
||||
|
||||
Please do **NOT** use the `<tt>` HTML elements:
|
||||
Please do **NOT** use the obsolete `<tt>` (<span style="font-family: monospace;">_teletype_</span>) HTML element:
|
||||
|
||||
```html
|
||||
<tt>The HTML 5 obsolete tt element is obsolete</tt> <=== no thank you
|
||||
```
|
||||
<tt>The obsolete tt element is obsolete</tt> <=== no thank you
|
||||
```
|
||||
|
||||
Instead use either a monospaced span:
|
||||
|
||||
```html
|
||||
```
|
||||
<span style="font-family: monospace;">Use of monospaced font is one option</span>
|
||||
```
|
||||
|
||||
@@ -213,7 +113,7 @@ Or better and easier still, use an inline markdown code block:
|
||||
```
|
||||
|
||||
|
||||
## Do NOT use unindented code clocks
|
||||
## Please do NOT use code blocks that are NOT indented
|
||||
|
||||
Please do **NOT** start code blocks at the left-hand edge.
|
||||
|
||||
@@ -252,7 +152,7 @@ For example, `next/guidelines.md` uses this markdown code block:
|
||||
````
|
||||
|
||||
|
||||
## Do NOT add trailing slash on void HTML elements
|
||||
## Please do NOT add trailing slash to HTML elements
|
||||
|
||||
Please do **NOT** use a trailing slash on [void HTML
|
||||
elements](https://github.com/validator/validator/wiki/Markup-»-Void-elements).
|
||||
@@ -306,7 +206,110 @@ Instead use just:
|
||||
etc.
|
||||
|
||||
|
||||
## Do NOT end markdown links in "))"
|
||||
## Please do NOT use trailing backslash outside of a code block
|
||||
|
||||
Unless the line is inside a markdown code block, please do **NOT**
|
||||
end a markdown line with a trailing backslash (`\`). Instead use
|
||||
a trailing `<br>`.
|
||||
|
||||
Instead of:
|
||||
|
||||
```
|
||||
In markdown,\ <=== no thank you
|
||||
do NOT use trailing\
|
||||
backslashes outside of\
|
||||
a code block
|
||||
```
|
||||
|
||||
use:
|
||||
|
||||
```
|
||||
In markdown,<br>
|
||||
use trailing<br>
|
||||
br's outside of<br>
|
||||
a code block
|
||||
```
|
||||
|
||||
Again, use of a trailing backslash (`\`) inside a markdown code block is fine:
|
||||
|
||||
````
|
||||
```
|
||||
This is OK\
|
||||
inside a\
|
||||
markdown code\
|
||||
block
|
||||
```
|
||||
````
|
||||
|
||||
This will prevent `pandoc(1)` from generating deprecated HTML elements such as
|
||||
`<br />`.
|
||||
|
||||
|
||||
## Please do NOT use markdown style images
|
||||
|
||||
Please do **NOT** use the markdown embedded image element.
|
||||
|
||||
Instead of using this markdown element to embed an image:
|
||||
|
||||
```
|
||||
 <=== no thank you
|
||||
```
|
||||
|
||||
Use an `<img ..>` HTML element with `alt=`, `width=` and `length=`
|
||||
attributes:
|
||||
|
||||
```
|
||||
<img src="filename.png"
|
||||
alt="describe the filename.png image for someone who cannot view it"
|
||||
width=PIXEL_WIDTH height=PIXEL_HEIGHT>
|
||||
```
|
||||
|
||||
For example, instead of:
|
||||
|
||||
```
|
||||
 <=== no thank you
|
||||
```
|
||||
|
||||
use this HTML:
|
||||
|
||||
```
|
||||
<img src="1984-anonymous-tattoo.jpg"
|
||||
alt="image of a tattoo of the 1984 anonymous C code"
|
||||
width=600 height=401>
|
||||
```
|
||||
|
||||
The problem goes beyond the fact that `pandoc(1)` generates problematic
|
||||
HTML from the markdown image construct, the resulting HTML does NOT
|
||||
have `width` and `height` information so browsers have to slow down
|
||||
on rendering text around the image until it can internally determine
|
||||
the image size.
|
||||
|
||||
|
||||
## Please do NOT use markdown style horizontal lines
|
||||
|
||||
Please do **NOT** use `**---**`-style lines in markdown to create horizontal
|
||||
lines or to separate sections.
|
||||
|
||||
Unless something is inside a markdown code block, do NOT start a
|
||||
line with 3 or more dashes (`-`s).
|
||||
|
||||
Such causes `pandoc(1)` to generate `<hr />`. The `<hr />` has no effect in
|
||||
standard HTML 5 and interacts badly with unquoted attribute values.
|
||||
|
||||
If a horizontal line is really needed, use:
|
||||
|
||||
```
|
||||
<hr>
|
||||
```
|
||||
|
||||
If a short line is needed, use:
|
||||
|
||||
```
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
```
|
||||
|
||||
|
||||
## Please do NOT end markdown links in "))"
|
||||
|
||||
Please do **NOT** end a markdown links with a double closed parenthesis "))".
|
||||
|
||||
@@ -338,7 +341,7 @@ Use:
|
||||
```
|
||||
|
||||
|
||||
## Do NOT place text on the next line after a markdown code block
|
||||
## Please do NOT place text on the next line after a markdown code block
|
||||
|
||||
Please do **NOT** place text on the next line after a markdown code block.
|
||||
Instead, place a blank line after the end of a markdown code block
|
||||
@@ -370,12 +373,12 @@ Use:
|
||||
```
|
||||
|
||||
C compilers cannot be given a -Wno-main-arg-errors flag.
|
||||
|
||||
BTW: note the blank line after the code block.
|
||||
````
|
||||
|
||||
**BTW**: Please note the blank line after the code block.
|
||||
|
||||
## Do NOT put "("s nor ")"s in markdown link titles
|
||||
|
||||
## Please do NOT put "("s nor ")"s in markdown link titles
|
||||
|
||||
Please do **NOT** use parenthesis inside the markdown link titles.
|
||||
|
||||
|
||||
Reference in new issue
Block a user