Imprint | Privacy Policy

Source blocks with highlightjs

Jens Lechtenbörger

Created: 2024-12-18 Wed 12:44

1. Source blocks without language

1.1. No fragments, no explicit classes

Some text
without language

1.2. No fragments, use of attr_html

(See HTML code for someClass)

Some text
without language

1.3. Multiple source blocks with given order

Some text
without language

2. Source blocks with language

2.1. Python code without fragments, with ID, caption, line numbers

def factorial(n):
    if n < 2:
	return 1
    else:
	return n * factorial(n - 1)

print(factorial(10))

2.2. Multiple source blocks with given order

def factorial(n):
    if n < 2:
	return 1
    else:
	return n * factorial(n - 1)
print(factorial(10))