测试
This commit is contained in:
parent
e8f8643638
commit
e2ce9434a8
@ -31,3 +31,38 @@ Lorem ipsum dolor sit amet, (1) consectetur adipiscing elit.
|
|||||||
|
|
||||||
[Subscribe to our newsletter](#){ .md-button .md-button--primary }
|
[Subscribe to our newsletter](#){ .md-button .md-button--primary }
|
||||||
[Send :fontawesome-solid-paper-plane:](#){ .md-button }
|
[Send :fontawesome-solid-paper-plane:](#){ .md-button }
|
||||||
|
|
||||||
|
``` py title="bubble_sort.py"
|
||||||
|
def bubble_sort(items):
|
||||||
|
for i in range(len(items)):
|
||||||
|
for j in range(len(items) - 1 - i):
|
||||||
|
if items[j] > items[j + 1]:
|
||||||
|
items[j], items[j + 1] = items[j + 1], items[j]
|
||||||
|
```
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
theme:
|
||||||
|
features:
|
||||||
|
- content.code.annotate # (1)
|
||||||
|
```
|
||||||
|
|
||||||
|
1. :man_raising_hand: I'm a code annotation! I can contain `code`, __formatted
|
||||||
|
text__, images, ... basically anything that can be written in Markdown.
|
||||||
|
|
||||||
|
``` py linenums="1"
|
||||||
|
def bubble_sort(items):
|
||||||
|
for i in range(len(items)):
|
||||||
|
for j in range(len(items) - 1 - i):
|
||||||
|
if items[j] > items[j + 1]:
|
||||||
|
items[j], items[j + 1] = items[j + 1], items[j]
|
||||||
|
```
|
||||||
|
|
||||||
|
``` py hl_lines="3-5"
|
||||||
|
def bubble_sort(items):
|
||||||
|
for i in range(len(items)):
|
||||||
|
for j in range(len(items) - 1 - i):
|
||||||
|
if items[j] > items[j + 1]:
|
||||||
|
items[j], items[j + 1] = items[j + 1], items[j]
|
||||||
|
```
|
||||||
|
When InlineHilite is enabled, syntax highlighting can be applied to inline code blocks by prefixing them with a shebang, i.e. `#!`, directly followed by the corresponding language shortcode.
|
||||||
|
The `#!python range()` function is used to generate a sequence of numbers.
|
@ -15,14 +15,13 @@ theme:
|
|||||||
- navigation.instant
|
- navigation.instant
|
||||||
- navigation.instant.prefetch
|
- navigation.instant.prefetch
|
||||||
- navigation.tracking
|
- navigation.tracking
|
||||||
- navigation.tabs
|
|
||||||
- navigation.tabs.sticky
|
|
||||||
- navigation.sections
|
- navigation.sections
|
||||||
- navigation.path
|
- navigation.path
|
||||||
- navigation.top
|
- navigation.top
|
||||||
- search.suggest
|
- search.suggest
|
||||||
- search.highlight
|
- search.highlight
|
||||||
- content.code.copy
|
- content.code.copy
|
||||||
|
- content.code.annotate
|
||||||
palette:
|
palette:
|
||||||
primary: blue grey
|
primary: blue grey
|
||||||
accent: light blue
|
accent: light blue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user