Changeset View
Changeset View
Standalone View
Standalone View
autotests/html/test.markdown.html
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> | ||
---|---|---|---|---|---|
2 | <html><head> | 2 | <html><head> | ||
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
4 | <title>test.markdown</title> | 4 | <title>test.markdown</title> | ||
5 | <meta name="generator" content="KF5::SyntaxHighlighting (Markdown)"/> | 5 | <meta name="generator" content="KF5::SyntaxHighlighting (Markdown)"/> | ||
6 | </head><body style="color:#1f1c1b"><pre> | 6 | </head><body style="color:#1f1c1b"><pre> | ||
7 | <span style="color:#898887;">---</span> | ||||
8 | <span style="color:#ca60ca;">Title:</span><span style="color:#898887;"> A Sample Markdown Document</span> | ||||
9 | <span style="color:#ca60ca;">Author:</span><span style="color:#898887;"> Fletcher T. Penney</span> | ||||
10 | <span style="color:#ca60ca;">Date:</span><span style="color:#898887;"> February 9, 2011</span> | ||||
11 | <span style="color:#ca60ca;">Comment:</span><span style="color:#898887;"> This is a comment intended to demonstrate </span> | ||||
12 | <span style="color:#898887;"> metadata that spans multiple lines.</span> | ||||
13 | <span style="color:#898887;">---</span> | ||||
14 | | ||||
7 | <span style="color:#644a9b;font-weight:bold;"># H1</span> | 15 | <span style="color:#644a9b;font-weight:bold;"># H1</span> | ||
8 | 16 | | |||
9 | <span style="color:#644a9b;font-weight:bold;">## H2</span> | 17 | <span style="color:#644a9b;font-weight:bold;">## H2</span> | ||
10 | 18 | | |||
11 | <span style="color:#644a9b;font-weight:bold;">### H3</span> | 19 | <span style="color:#644a9b;font-weight:bold;">### H3</span> | ||
12 | 20 | | |||
13 | Multi-line paragraph bla bla bla | 21 | Multi-line paragraph bla bla bla | ||
14 | bla bla bla. | 22 | bla bla bla. | ||
15 | 23 | | |||
16 | Intentional line break<span style="color:#999999;text-decoration:underline;"> </span> | 24 | Intentional line break<span style="color:#999999;text-decoration:underline;"> </span> | ||
17 | via two spaces at line. | 25 | via two spaces at line. | ||
18 | 26 | | |||
19 | Formats:<span style="font-style:italic;"> _italic_,</span><span style="font-weight:bold;"> **bold**,</span> <span style="color:#b08000;">`monospace`</span>, <span style="text-decoration:line-through;">~~strikeout~~</span> | 27 | Formats: <span style="font-style:italic;">_italic_</span>, <span style="font-weight:bold;">**bold**</span>, <span style="color:#b08000;">`monospace`</span>, <span style="text-decoration:line-through;">~~strikeout~~</span> | ||
20 | 28 | | |||
21 | Bullet list: | 29 | Bullet list: | ||
22 | 30 | | |||
23 | <span style="color:#bf0303;">* item1</span> | 31 | <span style="color:#ff5500;font-weight:bold;">* </span>item1 | ||
24 | <span style="color:#bf0303;">* item2</span> | 32 | <span style="color:#ff5500;font-weight:bold;">* </span>item2 | ||
25 | 33 | | |||
26 | Numbered list: | 34 | Numbered list: | ||
27 | 35 | | |||
28 | <span style="color:#bf0303;">1. item 1</span> | 36 | <span style="color:#ff5500;">1. </span>item 1 | ||
29 | <span style="color:#bf0303;">2. item 2</span> | 37 | <span style="color:#ff5500;">2. </span>item 2 | ||
38 | | ||||
39 | Task list: | ||||
40 | | ||||
41 | <span style="color:#ff5500;font-weight:bold;">- </span><span style="color:#0057ae;">[x]</span> Finish my changes | ||||
42 | <span style="color:#ff5500;font-weight:bold;">- </span><span style="color:#0057ae;">[ ]</span> Push my commits | ||||
43 | <span style="color:#ff5500;font-weight:bold;">- </span><span style="color:#0057ae;">[ ]</span> Open a pull request | ||||
44 | | ||||
45 | A link as normal text: <span style="text-decoration:underline;">http://example.com</span> | ||||
46 | | ||||
47 | <span style="color:#898887;">[</span><span style="color:#006e28;text-decoration:underline;">link</span><span style="color:#898887;">](</span><span style="color:#898887;text-decoration:underline;">http://kde.org</span><span style="color:#898887;">)</span> | ||||
48 | | ||||
49 | Auto-link: <span style="color:#006e28;"><</span><span style="color:#006e28;text-decoration:underline;">http://kate-editor.org</span><span style="color:#006e28;">></span> | ||||
50 | Mail: <span style="color:#006e28;"><mailto:</span><span style="color:#006e28;font-style:italic;text-decoration:underline;">mark@kde.org</span><span style="color:#006e28;">></span> | ||||
51 | | ||||
52 | This is <span style="color:#898887;">[</span><span style="color:#006e28;text-decoration:underline;">an example</span><span style="color:#898887;">](</span><span style="color:#898887;text-decoration:underline;">http://example.com/</span><span style="color:#898887;"> "Title")</span> inline link. | ||||
53 | | ||||
54 | See my <span style="color:#898887;">[</span><span style="color:#006e28;text-decoration:underline;">About</span><span style="color:#898887;">](/about/)</span> page for details. | ||||
55 | | ||||
56 | This is <span style="color:#898887;">[</span><span style="color:#006e28;text-decoration:underline;">an example</span><span style="color:#898887;">] [</span><span style="color:#898887;">id</span><span style="color:#898887;">]</span> reference-style link. | ||||
30 | 57 | | |||
31 | <span style="color:#006e28;text-decoration:underline;">[link](http://kde.org)</span> | 58 | <span style="color:#006e28;">[id]: </span><span style="color:#006e28;text-decoration:underline;">http://example.com/</span><span style="color:#006e28;"> "Optional Title Here"</span> | ||
59 | <span style="color:#006e28;">[foo]: </span><span style="color:#006e28;text-decoration:underline;">http://example.com/</span><span style="color:#006e28;"> 'Optional Title Here'</span> | ||||
60 | <span style="color:#006e28;">[bar]: </span><span style="color:#006e28;text-decoration:underline;">http://example.com/</span><span style="color:#006e28;"> (Optional Title Here)</span> | ||||
61 | <span style="color:#006e28;">[id2]: <</span><span style="color:#006e28;text-decoration:underline;">http://example.com/</span><span style="color:#006e28;">> "Optional Title Here"</span> | ||||
62 | | ||||
63 | <span style="color:#bf0303;background-color:#f7e6e6;">![Alt text](/path/to/img.jpg)</span> | ||||
64 | | ||||
65 | <span style="color:#bf0303;background-color:#f7e6e6;">![Alt text](/path/to/img.jpg "Optional title")</span> | ||||
66 | | ||||
67 | <span style="color:#898887;">[</span><span style="color:#bf0303;background-color:#f7e6e6;">![Alt text](</span><span style="color:#bf0303;background-color:#f7e6e6;text-decoration:underline;">https://url/to/img.svg</span><span style="color:#bf0303;background-color:#f7e6e6;">)</span><span style="color:#898887;">](</span><span style="color:#898887;text-decoration:underline;">https://link.com/example/</span><span style="color:#898887;">)</span> | ||||
32 | 68 | | |||
33 | <span style="color:#b08000;"> code 1</span> | 69 | <span style="color:#b08000;"> code 1</span> | ||
34 | <span style="color:#b08000;"> code 2</span> | 70 | <span style="color:#b08000;"> code 2</span> | ||
35 | 71 | | |||
36 | normal text | 72 | normal text | ||
37 | 73 | | |||
38 | <span style="color:#0057ae;">> block quote</span><span style="color:#0057ae;font-style:italic;"> _italic_</span> | 74 | <span style="color:#0057ae;">></span><span style="color:#0057ae;"> block quote </span><span style="color:#0057ae;font-style:italic;">_italic_</span> | ||
39 | <span style="color:#0057ae;">> more block quote</span> | 75 | <span style="color:#0057ae;">></span><span style="color:#0057ae;"> more block quote</span> | ||
76 | | ||||
77 | normal text | ||||
78 | | ||||
79 | Title: some text | ||||
80 | | ||||
81 | normal text | ||||
82 | | ||||
83 | <span style="color:#644a9b;font-weight:bold;"># Lists</span> | ||||
84 | | ||||
85 | <span style="color:#ff5500;">1. </span>item | ||||
86 | <span style="color:#ff5500;font-weight:bold;"> * </span>This is a list item | ||||
87 | with multiple lines. | ||||
88 | <span style="color:#b08000;">```</span> | ||||
89 | <span style="color:#b08000;"> code</span> | ||||
90 | <span style="color:#b08000;"> </span><span style="color:#b08000;">```</span> | ||||
91 | | ||||
92 | <span style="color:#0057ae;"> ></span><span style="color:#0057ae;"> This is a</span> | ||||
93 | <span style="color:#0057ae;"> blockquote</span> | ||||
94 | | ||||
95 | This is a new paragraph, which | ||||
96 | is part of the item in the | ||||
97 | previous list. | ||||
98 | | ||||
99 | <span style="color:#b08000;"> indented code block</span> | ||||
100 | | ||||
101 | Other paragraph. | ||||
102 | | ||||
103 | <span style="color:#ff5500;font-weight:bold;"> * </span>subitem | ||||
104 | <span style="color:#ff5500;font-weight:bold;"> * </span>subitem | ||||
105 | with multiple | ||||
106 | lines. | ||||
107 | | ||||
108 | New paragraph of | ||||
109 | the previous subitem. | ||||
110 | | ||||
111 | <span style="color:#b08000;"> code block</span> | ||||
112 | | ||||
113 | <span style="font-weight:bold;"> -----------------------</span> | ||||
114 | | ||||
115 | Other paragraph of | ||||
116 | the subitem. | ||||
117 | | ||||
118 | <span style="color:#ff5500;"> 30. </span>numlist item | ||||
119 | <span style="color:#ff5500;"> 31. </span>numlist item | ||||
120 | | ||||
121 | New paragraph of | ||||
122 | the previous item. | ||||
123 | | ||||
124 | <span style="color:#0057ae;"> ></span><span style="color:#0057ae;"> Blockquote</span> | ||||
125 | | ||||
126 | <span style="color:#b08000;"> code block</span> | ||||
127 | | ||||
128 | Other paragraph. | ||||
129 | | ||||
130 | <span style="color:#644a9b;font-weight:bold;"># Inline HTML</span> | ||||
131 | | ||||
132 | <span style="color:#b08000;">&copy;</span> | ||||
133 | <span style="font-weight:bold;"><strong></span>bold<span style="font-weight:bold;"></strong></span> | ||||
134 | <span style="font-weight:bold;"><code></span>code<span style="font-weight:bold;"></code></span> | ||||
135 | | ||||
136 | <span style="font-weight:bold;"><table></span> | ||||
137 | <span style="font-weight:bold;"><tr></span> | ||||
138 | <span style="font-weight:bold;"><th></span>a<span style="font-weight:bold;"></th></span> | ||||
139 | <span style="font-weight:bold;"><th></span>b<span style="font-weight:bold;"></th></span> | ||||
140 | <span style="font-weight:bold;"></tr></span> | ||||
141 | <span style="font-weight:bold;"><tr></span> | ||||
142 | <span style="font-weight:bold;"><th><ul></span> | ||||
143 | <span style="font-weight:bold;"><li></span>c<span style="font-weight:bold;"></li></span> | ||||
144 | <span style="font-weight:bold;"><li></span>d<span style="font-weight:bold;"></li></span> | ||||
145 | <span style="font-weight:bold;"></ul></th></span> | ||||
146 | <span style="font-weight:bold;"><th></span>e<span style="font-weight:bold;"></th></span> | ||||
147 | <span style="font-weight:bold;"></tr></span> | ||||
148 | <span style="font-weight:bold;"></table></span> | ||||
149 | | ||||
150 | normal text <span style="font-style:italic;">*italic*</span> | ||||
151 | | ||||
152 | <span style="color:#644a9b;font-weight:bold;"># Code</span> | ||||
153 | | ||||
154 | <span style="color:#b08000;">`simple code`</span> | ||||
155 | | ||||
156 | <span style="color:#b08000;">``simple ` code``</span> | ||||
157 | | ||||
158 | <span style="color:#b08000;">```simple `` ` code ```</span> | ||||
159 | | ||||
160 | <span style="color:#b08000;">````simple`code````</span> | ||||
161 | | ||||
162 | normal text | ||||
163 | normal text | ||||
164 | normal text | ||||
165 | normal text | ||||
166 | | ||||
167 | <span style="color:#b08000;"> code blocks are only allowed</span> | ||||
168 | <span style="color:#b08000;"> after an empty line.</span> | ||||
169 | | ||||
170 | <span style="color:#ff5500;font-weight:bold;">* </span>list | ||||
171 | list | ||||
40 | 172 | | |||
41 | normal text | 173 | normal text | ||
42 | 174 | | |||
43 | <span style="color:#898887;">Title: some text</span> | 175 | <span style="color:#ff5500;">1. </span>num-list | ||
176 | num-list | ||||
44 | 177 | | |||
45 | normal text | 178 | normal text | ||
46 | 179 | | |||
180 | <span style="color:#0057ae;">></span><span style="color:#0057ae;"> quote</span> | ||||
181 | <span style="color:#0057ae;"> quote</span> | ||||
182 | | ||||
183 | <span style="color:#b08000;"> code block</span> | ||||
184 | | ||||
185 | normal | ||||
186 | <span style="color:#898887;"><!-- comment --></span> | ||||
187 | <span style="color:#b08000;"> <!-- code, not comment --></span> | ||||
188 | <span style="color:#b08000;"> code</span> | ||||
189 | | ||||
190 | normal | ||||
191 | | ||||
192 | <span style="color:#898887;"> <!-- coment --></span> | ||||
193 | <span style="color:#b08000;"> code</span> | ||||
194 | | ||||
47 | <span style="color:#644a9b;font-weight:bold;"># Fenced code blocks (bug 356974)</span> | 195 | <span style="color:#644a9b;font-weight:bold;"># Fenced code blocks (bug 356974)</span> | ||
48 | 196 | | |||
49 | <span style="color:#644a9b;font-weight:bold;">## Bash</span> | 197 | <span style="color:#644a9b;font-weight:bold;">## Bash</span> | ||
50 | 198 | | |||
51 | <span style="color:#b08000;">```bash</span> | 199 | <span style="color:#b08000;">```bash</span> | ||
52 | <span style="color:#898887;">#!/usr/bin/env bash</span> | 200 | <span style="color:#898887;">#!/usr/bin/env bash</span> | ||
53 | 201 | | |||
54 | <span style="font-weight:bold;">for</span> <span style="color:#0095ff;font-weight:bold;">f</span> in *<span style="font-weight:bold;">;</span> <span style="font-weight:bold;">do</span> | 202 | <span style="font-weight:bold;">for</span> <span style="color:#0095ff;font-weight:bold;">f</span> in *<span style="font-weight:bold;">;</span> <span style="font-weight:bold;">do</span> | ||
Show All 11 Lines | |||||
66 | <span style="font-weight:bold;">public</span>: | 214 | <span style="font-weight:bold;">public</span>: | ||
67 | Q(); | 215 | Q(); | ||
68 | } | 216 | } | ||
69 | 217 | | |||
70 | Q::Q() :<span style="color:#0095ff;font-weight:bold;">QObject</span>(NULL) { | 218 | Q::Q() :<span style="color:#0095ff;font-weight:bold;">QObject</span>(NULL) { | ||
71 | } | 219 | } | ||
72 | <span style="color:#b08000;">```</span> | 220 | <span style="color:#b08000;">```</span> | ||
73 | 221 | | |||
222 | <span style="color:#644a9b;font-weight:bold;">## C</span> | ||||
223 | | ||||
224 | <span style="color:#b08000;">```c</span> | ||||
225 | <span style="color:#006e28;">#include </span><span style="color:#ff5500;"><stdio.h></span> | ||||
226 | <span style="color:#006e28;">#include </span><span style="color:#ff5500;">"stdint.h"</span> | ||||
227 | <span style="color:#006e28;">#define SOME_VAR 1</span> | ||||
228 | | ||||
229 | <span style="color:#0057ae;">static</span> <span style="color:#0057ae;">uint64_t</span> intWithSuffix = <span style="color:#b08000;">42</span><span style="color:#644a9b;font-weight:bold;">ull</span> + ~<span style="color:#b08000;">1233</span><span style="color:#644a9b;font-weight:bold;">L</span>; | ||||
230 | <span style="color:#0057ae;">static</span> <span style="color:#0057ae;">int</span> octNum = <span style="color:#b08000;">07232</span>; | ||||
231 | <span style="color:#b08000;">```</span> | ||||
232 | | ||||
233 | <span style="color:#644a9b;font-weight:bold;">## C# ##</span> | ||||
234 | | ||||
235 | <span style="color:#b08000;">```csharp</span> | ||||
236 | <span style="color:#0057ae;">var</span> arr = <span style="font-weight:bold;">new</span>[] { <span style="color:#b08000;">0</span>, <span style="color:#b08000;">1</span>, <span style="color:#b08000;">2</span>, <span style="color:#b08000;">3</span>, <span style="color:#b08000;">4</span> }; | ||||
237 | <span style="color:#0057ae;">var</span> anon = <span style="font-weight:bold;">new</span> { Country = <span style="color:#bf0303;">"Germany"</span>, Inhabitants = <span style="color:#b08000;">80000000</span> }; | ||||
238 | <span style="color:#b08000;">```</span> | ||||
239 | | ||||
74 | <span style="color:#644a9b;font-weight:bold;">## CMake</span> | 240 | <span style="color:#644a9b;font-weight:bold;">## CMake</span> | ||
75 | 241 | | |||
76 | <span style="color:#b08000;">```cmake</span> | 242 | <span style="color:#b08000;">```cmake</span> | ||
77 | <span style="font-weight:bold;">cmake_minimum_required</span>(<span style="color:#006e28;">VERSION</span> 3.10 <span style="color:#006e28;">FATAL_ERROR</span>) | 243 | <span style="font-weight:bold;">cmake_minimum_required</span>(<span style="color:#006e28;">VERSION</span> 3.10 <span style="color:#006e28;">FATAL_ERROR</span>) | ||
78 | 244 | | |||
79 | <span style="font-weight:bold;">project</span> (hello_world) | 245 | <span style="font-weight:bold;">project</span> (hello_world) | ||
80 | 246 | | |||
81 | <span style="font-weight:bold;">set</span>(<span style="color:#c09050;">QT_MIN_VERSION</span> <span style="color:#bf0303;">"5.6.0"</span>) | 247 | <span style="font-weight:bold;">set</span>(<span style="color:#c09050;">QT_MIN_VERSION</span> <span style="color:#bf0303;">"5.6.0"</span>) | ||
Show All 11 Lines | |||||
93 | <span style="color:#644a9b;font-weight:bold;">## Email</span> | 259 | <span style="color:#644a9b;font-weight:bold;">## Email</span> | ||
94 | 260 | | |||
95 | <span style="color:#b08000;">```email</span> | 261 | <span style="color:#b08000;">```email</span> | ||
96 | <span style="color:#644a9b;font-weight:bold;">From:</span> Konqi Dragon <span style="color:#0057ae;"><konqi@kde.org></span> | 262 | <span style="color:#644a9b;font-weight:bold;">From:</span> Konqi Dragon <span style="color:#0057ae;"><konqi@kde.org></span> | ||
97 | <span style="color:#644a9b;font-weight:bold;">To:</span> All <span style="color:#0057ae;"><all@kde.og></span> | 263 | <span style="color:#644a9b;font-weight:bold;">To:</span> All <span style="color:#0057ae;"><all@kde.og></span> | ||
98 | <span style="color:#644a9b;font-weight:bold;">Subject:</span> highlights | 264 | <span style="color:#644a9b;font-weight:bold;">Subject:</span> highlights | ||
99 | <span style="color:#b08000;">```</span> | 265 | <span style="color:#b08000;">```</span> | ||
100 | 266 | | |||
267 | <span style="color:#644a9b;font-weight:bold;">## Go</span> | ||||
268 | | ||||
269 | <span style="color:#b08000;">```go</span> | ||||
270 | <span style="font-weight:bold;">package</span> main | ||||
271 | | ||||
272 | <span style="font-weight:bold;">import</span> <span style="color:#bf0303;">"fmt"</span> | ||||
273 | | ||||
274 | <span style="font-weight:bold;">func</span> main() { | ||||
275 | fmt.Println(<span style="color:#bf0303;">"Hola, mundo."</span>) | ||||
276 | } | ||||
277 | <span style="color:#b08000;">```</span> | ||||
278 | | ||||
101 | <span style="color:#644a9b;font-weight:bold;">## Haskell</span> | 279 | <span style="color:#644a9b;font-weight:bold;">## Haskell</span> | ||
102 | 280 | | |||
103 | <span style="color:#b08000;">```haskell</span> | 281 | <span style="color:#b08000;">```haskell</span> | ||
104 | <span style="font-weight:bold;">module</span> <span style="color:#0057ae;">Main</span> (main) <span style="font-weight:bold;">where</span> | 282 | <span style="font-weight:bold;">module</span> <span style="color:#0057ae;">Main</span> (main) <span style="font-weight:bold;">where</span> | ||
105 | 283 | | |||
106 | <span style="color:#006e28;">main </span><span style="color:#006e28;">::</span> <span style="color:#0057ae;">IO</span> () | 284 | <span style="color:#006e28;">main </span><span style="color:#006e28;">::</span> <span style="color:#0057ae;">IO</span> () | ||
107 | main <span style="color:#006e28;">=</span> <span style="color:#644a9b;">putStrLn</span> <span style="color:#bf0303;">"Hello, World!"</span> | 285 | main <span style="color:#006e28;">=</span> <span style="color:#644a9b;">putStrLn</span> <span style="color:#bf0303;">"Hello, World!"</span> | ||
108 | <span style="color:#b08000;">```</span> | 286 | <span style="color:#b08000;">```</span> | ||
109 | 287 | | |||
110 | <span style="color:#644a9b;font-weight:bold;">## HTML</span> | 288 | <span style="color:#644a9b;font-weight:bold;">## HTML</span> | ||
111 | 289 | | |||
112 | <span style="color:#b08000;">```html</span> | 290 | <span style="color:#b08000;">```html</span> | ||
113 | <span style="font-weight:bold;"><html></span> | 291 | <span style="font-weight:bold;"><html></span> | ||
114 | <span style="font-weight:bold;"><body></span> | 292 | <span style="font-weight:bold;"><body></span> | ||
115 | <span style="font-weight:bold;"><p</span><span style="color:#006e28;"> class=</span><span style="color:#bf0303;">"main"</span><span style="font-weight:bold;">></span>Hello world!<span style="font-weight:bold;"></p></span> | 293 | <span style="font-weight:bold;"><p</span><span style="color:#006e28;"> class=</span><span style="color:#bf0303;">"main"</span><span style="font-weight:bold;">></span>Hello world!<span style="font-weight:bold;"></p></span> | ||
116 | <span style="font-weight:bold;"></body></span> | 294 | <span style="font-weight:bold;"></body></span> | ||
117 | <span style="font-weight:bold;"></html></span> | 295 | <span style="font-weight:bold;"></html></span> | ||
118 | <span style="color:#b08000;">```</span> | 296 | <span style="color:#b08000;">```</span> | ||
119 | 297 | | |||
298 | <span style="color:#644a9b;font-weight:bold;">## Java</span> | ||||
299 | | ||||
300 | <span style="color:#b08000;">```java</span> | ||||
301 | <span style="font-weight:bold;">package</span><span style="color:#ff5500;"> fibsandlies;</span> | ||||
302 | <span style="font-weight:bold;">import</span><span style="color:#ff5500;"> java.util.HashMap;</span> | ||||
303 | | ||||
304 | <span style="color:#898887;font-weight:bold;">/**</span> | ||||
305 | <span style="color:#898887;font-weight:bold;"> * This is an example of a Javadoc comment; Javadoc can compile documentation</span> | ||||
306 | <span style="color:#898887;font-weight:bold;"> * from this text. </span><span style="color:#898887;">Javadoc comments must immediately precede the class, method, or field being documented.</span> | ||||
307 | <span style="color:#898887;"> </span><span style="color:#898887;font-weight:bold;">*/</span> | ||||
308 | <span style="font-weight:bold;">public</span> <span style="font-weight:bold;">class</span> FibCalculator <span style="font-weight:bold;">extends</span> Fibonacci <span style="font-weight:bold;">implements</span> Calculator { | ||||
309 | | ||||
310 | <span style="font-weight:bold;">private</span> <span style="color:#0057ae;">static</span> <span style="color:#644a9b;font-weight:bold;">Map</span><<span style="color:#644a9b;font-weight:bold;">Integer</span>, <span style="color:#644a9b;font-weight:bold;">Integer</span>> memoized = <span style="font-weight:bold;">new</span> <span style="color:#644a9b;font-weight:bold;">HashMap</span><<span style="color:#644a9b;font-weight:bold;">Integer</span>, <span style="color:#644a9b;font-weight:bold;">Integer</span>>(); | ||||
311 | <span style="font-weight:bold;">public</span> <span style="color:#0057ae;">static</span> <span style="color:#0057ae;">void</span> <span style="color:#644a9b;">main</span>(<span style="color:#644a9b;font-weight:bold;">String</span>[] args) { | ||||
312 | memoized.<span style="color:#644a9b;">put</span>(<span style="color:#b08000;">1</span>, <span style="color:#b08000;">1</span>); | ||||
313 | memoized.<span style="color:#644a9b;">put</span>(<span style="color:#b08000;">2</span>, <span style="color:#b08000;">1</span>); | ||||
314 | <span style="color:#644a9b;font-weight:bold;">System</span>.<span style="color:#644a9b;">out</span>.<span style="color:#644a9b;">println</span>(<span style="color:#644a9b;">fibonacci</span>(<span style="color:#b08000;">12</span>)); | ||||
315 | } | ||||
316 | } | ||||
317 | <span style="color:#b08000;">```</span> | ||||
318 | | ||||
319 | <span style="color:#644a9b;font-weight:bold;">## JavaScript</span> | ||||
320 | | ||||
321 | <span style="color:#b08000;">```js</span> | ||||
322 | <span style="font-weight:bold;">function</span> <span style="color:#0057ae;">factorial</span>(n) { | ||||
323 | <span style="font-weight:bold;">if</span> (n === <span style="color:#b08000;">0</span>) { | ||||
324 | <span style="font-weight:bold;">return</span> <span style="color:#b08000;">1</span>; <span style="color:#898887;">// 0! = 1</span> | ||||
325 | } | ||||
326 | <span style="font-weight:bold;">return</span> n * <span style="color:#0057ae;">factorial</span>(n - <span style="color:#b08000;">1</span>); | ||||
327 | } | ||||
328 | <span style="color:#b08000;">```</span> | ||||
329 | | ||||
330 | <span style="color:#644a9b;font-weight:bold;">## JavaScript React (JSX)</span> | ||||
331 | | ||||
332 | <span style="color:#b08000;">```jsx</span> | ||||
333 | <span style="font-weight:bold;"><hello</span> <span style="font-weight:bold;">/></span> | ||||
334 | <span style="font-weight:bold;">function</span> <span style="color:#0057ae;">Story</span>(props) { | ||||
335 | <span style="font-weight:bold;">const</span> SpecificStory = components[<span style="color:#0057ae;">props</span>.<span style="color:#0057ae;">storyType</span>]; | ||||
336 | <span style="font-weight:bold;">return </span><span style="color:#644a9b;font-weight:bold;"><SpecificStory</span> <span style="color:#006e28;">story</span>=<span style="color:#0057ae;">{</span> <span style="color:#0057ae;">props</span>.<span style="color:#0057ae;">story</span> <span style="color:#0057ae;">}</span> <span style="color:#006e28;">attr2</span>=<span style="color:#bf0303;">"</span><span style="color:#b08000;">&ref;</span><span style="color:#bf0303;">"</span> <span style="color:#006e28;">attr3</span>=<span style="color:#bf0303;">"Hello\n"</span> <span style="color:#644a9b;font-weight:bold;">/></span>; | ||||
337 | } | ||||
338 | <span style="color:#b08000;">```</span> | ||||
339 | | ||||
120 | <span style="color:#644a9b;font-weight:bold;">## JSON</span> | 340 | <span style="color:#644a9b;font-weight:bold;">## JSON</span> | ||
121 | 341 | | |||
122 | <span style="color:#b08000;">```json</span> | 342 | <span style="color:#b08000;">```json</span> | ||
123 | <span style="color:#006e28;font-weight:bold;">[</span><span style="color:#644a9b;font-weight:bold;">{</span> | 343 | <span style="color:#006e28;font-weight:bold;">[</span><span style="color:#644a9b;font-weight:bold;">{</span> | ||
124 | <span style="color:#0057ae;">"hello"</span><span style="color:#644a9b;font-weight:bold;">:</span> <span style="color:#bf0303;">"world"</span><span style="color:#644a9b;font-weight:bold;">,</span> | 344 | <span style="color:#0057ae;">"hello"</span><span style="color:#644a9b;font-weight:bold;">:</span> <span style="color:#bf0303;">"world"</span><span style="color:#644a9b;font-weight:bold;">,</span> | ||
125 | <span style="color:#0057ae;">"count"</span><span style="color:#644a9b;font-weight:bold;">:</span> <span style="color:#b08000;">1</span><span style="color:#644a9b;font-weight:bold;">,</span> | 345 | <span style="color:#0057ae;">"count"</span><span style="color:#644a9b;font-weight:bold;">:</span> <span style="color:#b08000;">1</span><span style="color:#644a9b;font-weight:bold;">,</span> | ||
126 | <span style="color:#0057ae;">"bool"</span><span style="color:#644a9b;font-weight:bold;">:</span> <span style="font-weight:bold;">true</span> | 346 | <span style="color:#0057ae;">"bool"</span><span style="color:#644a9b;font-weight:bold;">:</span> <span style="font-weight:bold;">true</span> | ||
127 | <span style="color:#644a9b;font-weight:bold;">}</span><span style="color:#006e28;font-weight:bold;">]</span> | 347 | <span style="color:#644a9b;font-weight:bold;">}</span><span style="color:#006e28;font-weight:bold;">]</span> | ||
128 | <span style="color:#b08000;">```</span> | 348 | <span style="color:#b08000;">```</span> | ||
129 | 349 | | |||
130 | <span style="color:#644a9b;font-weight:bold;">## KConfig</span> | 350 | <span style="color:#644a9b;font-weight:bold;">## Matlab</span> | ||
351 | | ||||
352 | <span style="color:#b08000;">```matlab</span> | ||||
353 | <span style="color:#009900;">% Numbers _____________________________________________</span> | ||||
354 | <span style="color:#b08000;">5</span>, <span style="color:#b08000;">5.5</span>, <span style="color:#b08000;">.1</span>, <span style="color:#b08000;">0.1</span>, <span style="color:#b08000;">0.4e5</span>, <span style="color:#b08000;">1.2e-5</span>, <span style="color:#b08000;">5i</span>, <span style="color:#b08000;">5.3i</span>, <span style="color:#b08000;">6j</span>, <span style="color:#b08000;">.345</span>+<span style="color:#b08000;">3i</span> | ||||
355 | <span style="color:#b08000;">5</span>', <span style="color:#b08000;">5.5</span>', <span style="color:#b08000;">.1</span>', <span style="color:#b08000;">0.1</span>', <span style="color:#b08000;">0.4e5</span>', <span style="color:#b08000;">1.2e-5</span>', <span style="color:#b08000;">5i</span>', <span style="color:#b08000;">5.3i</span>', <span style="color:#b08000;">6j</span>', <span style="color:#b08000;">.345</span>+<span style="color:#b08000;">3i</span>' | ||||
356 | <span style="color:#b08000;">```</span> | ||||
357 | | ||||
358 | <span style="color:#644a9b;font-weight:bold;">## Markdown</span> | ||||
359 | | ||||
360 | <span style="color:#b08000;">```markdown</span> | ||||
361 | **bold** `code` | ||||
362 | > quote | ||||
131 | 363 | | |||
132 | <span style="color:#b08000;">```kconfig</span> | 364 | <span style="color:#b08000;">```</span> | ||
133 | <span style="color:#b08000;">[General]</span> | 365 | | ||
134 | <span style="color:#b08000;">Toggle=true</span> | 366 | <span style="color:#644a9b;font-weight:bold;">## Mustache/Handlebars</span> | ||
135 | <span style="color:#b08000;">Count=1</span> | 367 | | ||
368 | <span style="color:#b08000;">```handlebars</span> | ||||
369 | <span style="color:#644a9b;font-weight:bold;">{{#movie}}</span> | ||||
370 | <span style="font-weight:bold;"><div></span> | ||||
371 | <span style="font-weight:bold;"><h1></span><span style="color:#0057ae;">{{</span>title<span style="color:#0057ae;">}}</span><span style="font-weight:bold;"></h1></span> | ||||
372 | <span style="font-weight:bold;"><img</span><span style="color:#006e28;"> src</span>=<span style="color:#bf0303;">"</span><span style="color:#0057ae;">{{</span>poster<span style="color:#0057ae;">}}</span><span style="color:#bf0303;">"</span><span style="color:#006e28;"> alt</span>=<span style="color:#bf0303;">"</span><span style="color:#0057ae;">{{</span>title<span style="color:#0057ae;">}}</span><span style="color:#bf0303;">"</span><span style="font-weight:bold;">/></span> | ||||
373 | <span style="font-weight:bold;"></div></span> | ||||
374 | <span style="font-weight:bold;"><div></span> | ||||
375 | Rating - <span style="color:#0057ae;">{{</span>ratings.critics_rating<span style="color:#0057ae;">}}</span> | ||||
376 | <span style="font-weight:bold;"></div></span> | ||||
377 | <span style="color:#644a9b;font-weight:bold;">{{/movie}}</span> | ||||
378 | <span style="color:#b08000;">```</span> | ||||
379 | | ||||
380 | <span style="color:#644a9b;font-weight:bold;">## Perl</span> | ||||
381 | | ||||
382 | <span style="color:#b08000;">```perl</span> | ||||
383 | <span style="font-weight:bold;">my</span> <span style="color:#0057ae;">$var</span> = <span style="color:#644a9b;">shift</span>; | ||||
384 | | ||||
385 | <span style="color:#0057ae;">$var</span> =~ <span style="color:#008000;font-weight:bold;">s/</span><span style="color:#006e28;">bla</span><span style="color:#008000;font-weight:bold;">/</span><span style="color:#bf0303;">foo</span><span style="color:#008000;font-weight:bold;">/igs</span>; | ||||
386 | <span style="color:#0057ae;">$var</span> =~ <span style="color:#008000;font-weight:bold;">s!</span><span style="color:#006e28;">bla</span><span style="color:#008000;font-weight:bold;">!</span><span style="color:#bf0303;">foo</span><span style="color:#008000;font-weight:bold;">!igs</span>; | ||||
387 | <span style="color:#0057ae;">$var</span> =~ <span style="color:#008000;font-weight:bold;">s#</span><span style="color:#006e28;">bla</span><span style="color:#008000;font-weight:bold;">#</span><span style="color:#bf0303;">foo</span><span style="color:#008000;font-weight:bold;">#igs</span>; | ||||
136 | <span style="color:#b08000;">```</span> | 388 | <span style="color:#b08000;">```</span> | ||
137 | 389 | | |||
138 | <span style="color:#644a9b;font-weight:bold;">## PHP</span> | 390 | <span style="color:#644a9b;font-weight:bold;">## PHP</span> | ||
139 | 391 | | |||
140 | <span style="color:#b08000;">```php</span> | 392 | <span style="color:#b08000;">```php</span> | ||
141 | <span style="font-weight:bold;">namespace</span> Application\Controller<span style="color:#006e28;">;</span> | 393 | <span style="font-weight:bold;">namespace</span> Application\Controller<span style="color:#006e28;">;</span> | ||
142 | 394 | | |||
143 | <span style="font-weight:bold;">use</span> Zend\Mvc\Controller\AbstractActionController<span style="color:#006e28;">;</span> | 395 | <span style="font-weight:bold;">use</span> Zend\Mvc\Controller\AbstractActionController<span style="color:#006e28;">;</span> | ||
Show All 16 Lines | |||||
160 | <span style="color:#b08000;">```qml</span> | 412 | <span style="color:#b08000;">```qml</span> | ||
161 | <span style="color:#008000;">Text</span> { | 413 | <span style="color:#008000;">Text</span> { | ||
162 | <span style="color:#0057ae;">id</span>: hello | 414 | <span style="color:#0057ae;">id</span>: hello | ||
163 | <span style="color:#0057ae;">width</span>: <span style="color:#b08000;">100</span> | 415 | <span style="color:#0057ae;">width</span>: <span style="color:#b08000;">100</span> | ||
164 | <span style="color:#0057ae;">text</span>: <span style="color:#bf0303;">"Hello world!"</span> | 416 | <span style="color:#0057ae;">text</span>: <span style="color:#bf0303;">"Hello world!"</span> | ||
165 | } | 417 | } | ||
166 | <span style="color:#b08000;">```</span> | 418 | <span style="color:#b08000;">```</span> | ||
167 | 419 | | |||
420 | <span style="color:#644a9b;font-weight:bold;">## R</span> | ||||
421 | | ||||
422 | <span style="color:#b08000;">```r</span> | ||||
423 | <span style="color:#898887;"># Declare function “f” with parameters “x”, “y“</span> | ||||
424 | <span style="color:#898887;"># that returns a linear combination of x and y.</span> | ||||
425 | f <span style="color:#336366;font-weight:bold;"><-</span><span style="color:#bf0303;"> </span><span style="font-weight:bold;">function</span>(x, y) { | ||||
426 | z <span style="color:#336366;font-weight:bold;"><-</span><span style="color:#bf0303;"> </span><span style="color:#b08000;">3</span> *<span style="color:#bf0303;"> </span>x +<span style="color:#bf0303;"> </span><span style="color:#b08000;">4</span> *<span style="color:#bf0303;"> </span>y | ||||
427 | <span style="font-weight:bold;">return</span>(z) | ||||
428 | } | ||||
429 | <span style="color:#b08000;">```</span> | ||||
430 | | ||||
431 | <span style="color:#644a9b;font-weight:bold;">## Ruby</span> | ||||
432 | | ||||
433 | <span style="color:#b08000;">```ruby</span> | ||||
434 | <span style="color:#000080;">require</span> <span style="color:#dd4a4a;">'Config'</span> | ||||
435 | <span style="font-weight:bold;">def</span> <span style="color:#bb1188;font-weight:bold;">CGI</span><span style="color:#ff9fec;">::</span><span style="color:#4000a7;">escape</span>(string) | ||||
436 | string<span style="color:#4000a7;">.gsub</span>(<span style="color:#4a5704;">/([^ a-zA-Z0-9_.-]+)/n</span>) <span style="font-weight:bold;">do</span> | ||||
437 | <span style="color:#924c9d;">'%'</span> <span style="color:#ff9fec;">+</span> <span style="color:#c00000;">$1</span><span style="color:#4000a7;">.unpack</span>(<span style="color:#dd4a4a;">'H2'</span> <span style="color:#ff9fec;">*</span> <span style="color:#c00000;">$1</span><span style="color:#4000a7;">.size</span>)<span style="color:#4000a7;">.join</span>(<span style="color:#924c9d;">'%'</span>)<span style="color:#4000a7;">.upcase</span> | ||||
438 | <span style="font-weight:bold;">end</span><span style="color:#4000a7;">.tr</span>(<span style="color:#924c9d;">' '</span>, <span style="color:#924c9d;">'+'</span>) | ||||
439 | <span style="font-weight:bold;">end</span> | ||||
440 | <span style="color:#b08000;">```</span> | ||||
441 | | ||||
168 | <span style="color:#644a9b;font-weight:bold;">## Rust</span> | 442 | <span style="color:#644a9b;font-weight:bold;">## Rust</span> | ||
169 | 443 | | |||
170 | <span style="color:#b08000;">```rust</span> | 444 | <span style="color:#b08000;">```rust</span> | ||
171 | <span style="font-weight:bold;">fn</span> main() { | 445 | <span style="font-weight:bold;">fn</span> main() { | ||
172 | <span style="color:#006e28;">println!</span>(<span style="color:#bf0303;">"Hello world!"</span>); | 446 | <span style="color:#006e28;">println!</span>(<span style="color:#bf0303;">"Hello world!"</span>); | ||
173 | } | 447 | } | ||
174 | <span style="color:#b08000;">```</span> | 448 | <span style="color:#b08000;">```</span> | ||
175 | 449 | | |||
450 | <span style="color:#644a9b;font-weight:bold;">## MySQL</span> | ||||
451 | | ||||
452 | <span style="color:#b08000;">```mysql</span> | ||||
453 | <span style="color:#898887;">-- comment</span> | ||||
454 | <span style="font-weight:bold;">CREATE</span> <span style="font-weight:bold;">TABLE</span> stuff <span style="font-weight:bold;">COLUMNS</span>(col1 <span style="color:#0057ae;">INT</span>, col2 <span style="color:#0057ae;">Varchar</span>); | ||||
455 | <span style="font-weight:bold;">SELECT</span> * <span style="font-weight:bold;">FROM</span> stuff <span style="font-weight:bold;">WHERE</span> id = <span style="color:#bf0303;">'string'</span>; | ||||
456 | <span style="font-weight:bold;">select</span> * <span style="font-weight:bold;">from</span> stuff <span style="font-weight:bold;">where</span> id < <span style="color:#b08000;">0.42</span>; | ||||
457 | <span style="font-weight:bold;">Select</span> col1, col2 <span style="font-weight:bold;">From</span> stuff <span style="font-weight:bold;">Where</span> stuff<span style="color:#924c9d;">.</span>col1 <span style="font-weight:bold;">IS</span> <span style="font-weight:bold;">NOT</span> <span style="font-weight:bold;">NuLL</span>; | ||||
458 | <span style="color:#b08000;">```</span> | ||||
459 | | ||||
460 | <span style="color:#644a9b;font-weight:bold;">## TypeScript</span> | ||||
461 | | ||||
462 | <span style="color:#b08000;">```ts</span> | ||||
463 | <span style="font-weight:bold;font-style:italic;">class</span> Student { | ||||
464 | fullName: <span style="color:#0057ae;">string</span>; | ||||
465 | <span style="font-weight:bold;font-style:italic;">constructor</span>(<span style="font-weight:bold;font-style:italic;">public</span> firstName: <span style="color:#0057ae;">string</span>, <span style="font-weight:bold;font-style:italic;">public</span> middleInitial: <span style="color:#0057ae;">string</span>, <span style="font-weight:bold;font-style:italic;">public</span> lastName: <span style="color:#0057ae;">string</span>) { | ||||
466 | <span style="font-weight:bold;">this</span>.<span style="color:#0057ae;">fullName</span> = firstName + <span style="color:#bf0303;">" "</span> + middleInitial + <span style="color:#bf0303;">" "</span> + lastName; | ||||
467 | } | ||||
468 | } | ||||
469 | <span style="color:#b08000;">```</span> | ||||
470 | | ||||
176 | <span style="color:#644a9b;font-weight:bold;">## XML</span> | 471 | <span style="color:#644a9b;font-weight:bold;">## XML</span> | ||
177 | 472 | | |||
178 | <span style="color:#b08000;">```xml</span> | 473 | <span style="color:#b08000;">```xml</span> | ||
179 | <span style="font-weight:bold;"><tag</span><span style="color:#006e28;"> attribute=</span><span style="color:#bf0303;">"3"</span><span style="font-weight:bold;">></span> | 474 | <span style="font-weight:bold;"><tag</span><span style="color:#006e28;"> attribute=</span><span style="color:#bf0303;">"3"</span><span style="font-weight:bold;">></span> | ||
180 | <span style="font-weight:bold;"><nested/></span> | 475 | <span style="font-weight:bold;"><nested/></span> | ||
181 | <span style="font-weight:bold;"></tag></span> | 476 | <span style="font-weight:bold;"></tag></span> | ||
182 | <span style="color:#b08000;">```</span> | 477 | <span style="color:#b08000;">```</span> | ||
183 | 478 | | |||
479 | <span style="color:#644a9b;font-weight:bold;">## reStructuredText</span> | ||||
480 | | ||||
481 | <span style="color:#b08000;">```rst</span> | ||||
482 | Section Header | ||||
483 | ============== | ||||
484 | | ||||
485 | <span style="color:#0057ae;">.. image:: </span>/path/to/image.jpg | ||||
486 | | ||||
487 | - A bullet list item | ||||
488 | <span style="color:#b08000;">```</span> | ||||
489 | | ||||
490 | <span style="color:#644a9b;font-weight:bold;">## Doxygen</span> | ||||
491 | | ||||
492 | <span style="color:#b08000;">```doxygen</span> | ||||
493 | <span style="color:#898887;">a normal member taking two arguments and returning an integer value.</span> | ||||
494 | <span style="color:#ca60ca;font-weight:bold;">@param</span><span style="color:#898887;"> </span><span style="color:#0095ff;font-weight:bold;">a</span><span style="color:#898887;"> an integer argument.</span> | ||||
495 | <span style="color:#ca60ca;font-weight:bold;">@param</span><span style="color:#898887;"> </span><span style="color:#0095ff;font-weight:bold;">s</span><span style="color:#898887;"> a constant character pointer.</span> | ||||
496 | <span style="color:#ca60ca;font-weight:bold;">@see</span><span style="color:#898887;"> Javadoc_Test()</span> | ||||
497 | <span style="color:#ca60ca;font-weight:bold;">@see</span><span style="color:#898887;"> publicVar()</span> | ||||
498 | <span style="color:#ca60ca;font-weight:bold;">@return</span><span style="color:#898887;"> The test results</span> | ||||
499 | <span style="color:#b08000;">```</span> | ||||
500 | | ||||
184 | <span style="color:#644a9b;font-weight:bold;">## No language specified</span> | 501 | <span style="color:#644a9b;font-weight:bold;">## No language specified</span> | ||
185 | 502 | | |||
186 | <span style="color:#b08000;">```</span> | 503 | <span style="color:#b08000;">```</span> | ||
187 | <span style="color:#b08000;">No language is specified, but it should be still rendered as code block.</span> | 504 | <span style="color:#b08000;">No language is specified, but it should be still rendered as code block.</span> | ||
188 | <span style="color:#b08000;">```</span> | 505 | <span style="color:#b08000;">```</span> | ||
506 | | ||||
507 | <span style="color:#644a9b;font-weight:bold;"># Fenced code blocks with more than 3 backticks or tildes</span> | ||||
508 | | ||||
509 | <span style="color:#b08000;">~~~</span> | ||||
510 | <span style="color:#b08000;">Fenced code block with 3 tildes.</span> | ||||
511 | <span style="color:#b08000;">~~~</span> | ||||
512 | | ||||
513 | <span style="color:#b08000;">`````````</span> | ||||
514 | <span style="color:#b08000;">Some implementations of Markdown/MultiMarkdown support more than 3 backticks or tildes.</span> | ||||
515 | <span style="color:#b08000;">```</span> | ||||
516 | <span style="color:#b08000;">The block ends with the same amount of backticks.</span> | ||||
517 | <span style="color:#b08000;">`````````</span> | ||||
518 | | ||||
519 | <span style="color:#b08000;">~~~~~~~~~~~~</span> | ||||
520 | <span style="color:#b08000;">Fenced code block with more tildes.</span> | ||||
521 | <span style="color:#b08000;">~~~~~~~~~~~~</span> | ||||
522 | | ||||
523 | <span style="color:#644a9b;font-weight:bold;">## With languages</span> | ||||
524 | | ||||
525 | <span style="color:#b08000;">```````html</span> | ||||
526 | <span style="font-weight:bold;"><html></span> | ||||
527 | <span style="font-weight:bold;"><body></span> | ||||
528 | <span style="font-weight:bold;"><p</span><span style="color:#006e28;"> class=</span><span style="color:#bf0303;">"main"</span><span style="font-weight:bold;">></span>Hello world!<span style="font-weight:bold;"></p></span> | ||||
529 | <span style="font-weight:bold;"></body></span> | ||||
530 | <span style="font-weight:bold;"></html></span> | ||||
531 | ``` <span style="color:#898887;"><!-- <= doesn't end here --></span> | ||||
532 | <span style="color:#b08000;">```````</span> | ||||
533 | | ||||
534 | <span style="color:#b08000;">~~~bash</span> | ||||
535 | <span style="font-weight:bold;">for</span> <span style="color:#0095ff;font-weight:bold;">f</span> in *<span style="font-weight:bold;">;</span> <span style="font-weight:bold;">do</span> | ||||
536 | <span style="color:#644a9b;font-weight:bold;">echo</span> <span style="color:#bf0303;">"</span><span style="color:#0057ae;">$f</span><span style="color:#bf0303;">"</span> | ||||
537 | <span style="font-weight:bold;">done</span> | ||||
538 | <span style="color:#b08000;">~~~</span> | ||||
539 | | ||||
540 | <span style="color:#b08000;">~~~~~~~~~python</span> | ||||
541 | <span style="font-weight:bold;">def</span> addXToY(x, y): | ||||
542 | total = x + y | ||||
543 | <span style="color:#644a9b;font-weight:bold;">print</span> total | ||||
544 | ~~~ <span style="color:#898887;"># <= doesn't end here</span> | ||||
545 | <span style="color:#b08000;">~~~~~~~~~</span> | ||||
546 | | ||||
547 | <span style="color:#644a9b;font-weight:bold;"># Italic and bold text</span> | ||||
548 | | ||||
549 | <span style="font-weight:bold;">**b**</span> <span style="font-style:italic;">*i*</span> <span style="font-weight:bold;">__b__</span> <span style="font-style:italic;">_i_</span> | ||||
550 | <span style="font-weight:bold;font-style:italic;">***ib***</span> <span style="font-weight:bold;font-style:italic;">___ib___</span> | ||||
551 | <span style="font-weight:bold;font-style:italic;">**_ib_**</span> <span style="font-weight:bold;font-style:italic;">__*ib*__</span> | ||||
552 | | ||||
553 | <span style="color:#ff5500;font-weight:bold;">* </span><span style="font-style:italic;">_italic_</span> <span style="font-weight:bold;">**bold**</span> <span style="font-weight:bold;font-style:italic;">***ib***</span> <span style="text-decoration:line-through;">~~strikeout~~</span> | ||||
554 | | ||||
555 | <span style="color:#0057ae;">></span><span style="color:#0057ae;"> </span><span style="color:#0057ae;font-style:italic;">_italic_</span><span style="color:#0057ae;"> </span><span style="color:#0057ae;font-weight:bold;">**bold**</span><span style="color:#0057ae;"> </span><span style="color:#0057ae;font-weight:bold;font-style:italic;">***ib***</span><span style="color:#0057ae;"> </span><span style="color:#0057ae;text-decoration:line-through;">~~strikeout~~</span> | ||||
556 | | ||||
557 | <span style="color:#644a9b;font-weight:bold;">## Bold</span> | ||||
558 | <span style="font-weight:bold;">**bold*___text**</span> normal | ||||
559 | <span style="font-weight:bold;">__bold_***text__</span> normal | ||||
560 | | ||||
561 | <span style="color:#644a9b;font-weight:bold;">## Italic</span> | ||||
562 | <span style="font-style:italic;">*italic _ text*</span> normal | ||||
563 | <span style="font-style:italic;">_italic * text_</span> normal | ||||
564 | | ||||
565 | <span style="color:#644a9b;font-weight:bold;">## Italic-Bold</span> | ||||
566 | <span style="font-weight:bold;font-style:italic;">***italic-bold ** italic-bold***</span> normal | ||||
567 | <span style="font-weight:bold;font-style:italic;">***bold-italic text **bold-italic text***</span> normal | ||||
568 | <span style="font-weight:bold;font-style:italic;">***bold*italic***</span> normal | ||||
569 | <span style="font-weight:bold;font-style:italic;">**_bold-italic text_**</span> normal | ||||
570 | | ||||
571 | <span style="color:#898887;"><!-- A non-space character is required after or before * or _ --></span> | ||||
572 | _ normal text_ * normal text * | ||||
573 | <span style="font-style:italic;">*italic text*</span>normal text* | ||||
574 | <span style="font-style:italic;">*italic text *italic text*</span> | ||||
575 | <span style="font-weight:bold;">**bold text**</span>normal text** | ||||
576 | <span style="font-weight:bold;">**bold text **bold text**</span> | ||||
577 | | ||||
578 | <span style="color:#898887;"><!-- A delimiter is required after or before _ --></span> | ||||
579 | aaa<span style="font-weight:bold;">**bold text**</span>aaaaa | ||||
580 | aaa__normal text__aaaaa | ||||
581 | пристаням<span style="font-style:italic;">_стремятся_</span> | ||||
582 | | ||||
583 | <span style="color:#898887;"><!-- Escapes within bold or italic text --></span> | ||||
584 | <span style="color:#3daee9;">\*</span>normal text* | ||||
585 | _normal text<span style="color:#3daee9;">\_</span> | ||||
586 | <span style="font-style:italic;">**italic text\**</span> | ||||
587 | <span style="font-weight:bold;">***only bold\***</span> | ||||
588 | <span style="font-weight:bold;">**bold\** bold**</span> | ||||
189 | </pre></body></html> | 589 | </pre></body></html> |