From San Andreas Multiplayer
				
				
				Jump to navigationJump to search
				
				
				
				
				
				
				
				|  |   | 
| (11 intermediate revisions by the same user not shown) | 
| Line 1: | Line 1: | 
|  | == Beispiel für Syntax-Highlighting mit Prism.js ==
 |  | <syntaxhighlight lang="php" line> | 
|  |   |  | def quick_sort(arr): | 
|  | Hier ist ein Codebeispiel in Python, das die Sprache automatisch hervorhebt. Beachte die Klasse `language-python` im `<code>`-Tag, die Prism.js mitteilt, dass es sich um Python-Code handelt.
 |  | 	less = [] | 
|  |   |  | 	pivot_list = [] | 
|  | <pre><code class="language-python">
 |  | 	more = [] | 
|  | def fibonacci(n): |  | 	if len(arr) <= 1: | 
|  |     a, b =0, 1
 |  | 		return arr | 
|  |     for _ in range(n):
 |  | 	else: | 
|  |         print(a)
 |  | 		pass | 
|  |         a, b = b, a + b
 |  | </syntaxhighlight> | 
|  |   |  | 
|  | fibonacci(10)
 |  | 
|  | </code></pre>
 |  | 
|  |   |  | 
|  | == JavaScript-Beispiel == |  | 
|  |   |  | 
|  | Hier ist ein JavaScript-Codebeispiel. Die Klasse `language-javascript` sorgt für das Highlighting.
 |  | 
|  |   |  | 
|  | <pre><code class="language-javascript">
 |  | 
|  | function greet(name){
 |  | 
|  |     console.log("Hello, " + name + "!");
 |  | 
|  | }
 |  | 
|  |   |  | 
|  | greet("World");
 |  | 
|  | </code></pre>
 |  | 
|  |   |  | 
|  | == HTML-Beispiel ==
 |  | 
|  |   |  | 
|  | Auch HTML-Code kann auf diese Weise hervorgehoben werden:
 |  | 
|  |   |  | 
|  | <pre><code class="language-markup">
 |  | 
|  | <!DOCTYPE html>
 |  | 
|  | <html lang="en">
 |  | 
|  | <head>
 |  | 
|  |     <meta charset="UTF-8">
 |  | 
|  |     <title>Document</title>
 |  | 
|  | </head>
 |  | 
|  | <body>
 |  | 
|  |     <h1>Hello, World!</h1>
 |  | 
|  | </body>
 |  | 
|  | </html>
 |  | 
|  | </code></pre>
 |  | 
		Latest revision as of 14:00, 3 November 2024
def quick_sort(arr):
	less = []
	pivot_list = []
	more = []
	if len(arr) <= 1:
		return arr
	else:
		pass