Fossil SCM

Explained the "language-WORD" CSS styling used with fenced code blocks in Markdown within md_rules.

wyoung 2020-01-11 01:00 trunk
Commit 06a3361dc08754ae251ebe73cfd5a69592c5256135df383ca1a6667adb12fd8a
1 file changed +8 -2
+8 -2
--- src/markdown.md
+++ src/markdown.md
@@ -100,12 +100,18 @@
100100
>
101101
> For blocks of text or code:
102102
>
103103
> 1. Indent the text using a tab character or at least four spaces.
104104
> 2. Precede the block with an HTML `<pre>` tag and follow it with `</pre>`.
105
-> 3. Surround the block by \`\`\` (three or more) or \~\~\~ either at the
106
-> left margin or indented no more than three spaces.
105
+> 3. Surround the block by <tt>\`\`\`</tt> (three or more) or <tt>\~\~\~</tt> either at the
106
+> left margin or indented no more than three spaces. The first word
107
+> on that same line (if any) is used in a “`language-WORD`” CSS style in
108
+> the HTML rendering of that code block and is intended for use by
109
+> code syntax highlighters. Thus <tt>\`\`\`c</tt> would mark a block of code
110
+> in the C programming language. Text to be rendered inside the code block
111
+> should therefore start on the next line, not be cuddled up with the
112
+> backticks or tildes.
107113
108114
> With the standard skins, verbatim text is rendered in a fixed-width font,
109115
> but that is purely a presentation matter, controlled by the skin’s CSS.
110116
111117
## Tables ##
112118
--- src/markdown.md
+++ src/markdown.md
@@ -100,12 +100,18 @@
100 >
101 > For blocks of text or code:
102 >
103 > 1. Indent the text using a tab character or at least four spaces.
104 > 2. Precede the block with an HTML `<pre>` tag and follow it with `</pre>`.
105 > 3. Surround the block by \`\`\` (three or more) or \~\~\~ either at the
106 > left margin or indented no more than three spaces.
 
 
 
 
 
 
107
108 > With the standard skins, verbatim text is rendered in a fixed-width font,
109 > but that is purely a presentation matter, controlled by the skin’s CSS.
110
111 ## Tables ##
112
--- src/markdown.md
+++ src/markdown.md
@@ -100,12 +100,18 @@
100 >
101 > For blocks of text or code:
102 >
103 > 1. Indent the text using a tab character or at least four spaces.
104 > 2. Precede the block with an HTML `<pre>` tag and follow it with `</pre>`.
105 > 3. Surround the block by <tt>\`\`\`</tt> (three or more) or <tt>\~\~\~</tt> either at the
106 > left margin or indented no more than three spaces. The first word
107 > on that same line (if any) is used in a “`language-WORD`” CSS style in
108 > the HTML rendering of that code block and is intended for use by
109 > code syntax highlighters. Thus <tt>\`\`\`c</tt> would mark a block of code
110 > in the C programming language. Text to be rendered inside the code block
111 > should therefore start on the next line, not be cuddled up with the
112 > backticks or tildes.
113
114 > With the standard skins, verbatim text is rendered in a fixed-width font,
115 > but that is purely a presentation matter, controlled by the skin’s CSS.
116
117 ## Tables ##
118

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button