File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -368,6 +368,30 @@ def bubble_sort(items):
368
368
items[j], items[j + 1] = items[j + 1], items[j]
369
369
` ` `
370
370
371
+ Line ranges can also be used for conveniently specifying multiple lines.
372
+
373
+ _Example_ :
374
+
375
+ ` ` ` ` markdown
376
+ ` ` ` python hl_lines="2-5"
377
+ def bubble_sort(items):
378
+ for i in range(len(items)):
379
+ for j in range(len(items) - 1 - i):
380
+ if items[j] > items[j + 1]:
381
+ items[j], items[j + 1] = items[j + 1], items[j]
382
+ ` ` `
383
+ ````
384
+
385
+ _Result_ :
386
+
387
+ ` ` ` python hl_lines="2-5"
388
+ def bubble_sort(items):
389
+ for i in range(len(items)):
390
+ for j in range(len(items) - 1 - i):
391
+ if items[j] > items[j + 1]:
392
+ items[j], items[j + 1] = items[j + 1], items[j]
393
+ ` ` `
394
+
371
395
# ## Highlighting inline code blocks
372
396
373
397
When [InlineHilite][21] is enabled, inline code blocks can be highlighted by
You can’t perform that action at this time.
0 commit comments