// Asciidoc begins
= Test include to code
Here's a paragraph. Let's take a look at a code block plus an include
[source, python]
----
include::loops.py[tag=count]
----
Python code filename loops.py
# Python begins
# // tag::count[]
count = 0
# // end::count[]
while count < 5:
print(count)
count += 1 # This is the same as count = count + 1
Output (text) - this is formatted in HTML or PDF as title, para, then a code block
Test include to code
Here’s a paragraph. Let’s take a look at a code block plus an include
count = 0
Asciidoc document:
Python code filename loops.py Output (text) - this is formatted in HTML or PDF as title, para, then a code block