Skip to content

Commit 9694cfe

Browse files
committed
add lines range
1 parent 48ee06c commit 9694cfe

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

docs/modules/ROOT/pages/index.adoc

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ include::https://raw.githubusercontent.com/feelpp/asciidoctor-remote-include-pro
5151
=== Include a remote file partially using tags
5252

5353
In Asciidoctor we can include a source file partially using tags, see https://asciidoctor.org/docs/user-manual/#by-tagged-regions[here].
54-
The extension enable this very feature.
54+
The extension enables this very feature.
5555

5656
++++
5757
<pre>
@@ -71,6 +71,29 @@ which gives:
7171
include::https://raw.githubusercontent.com/feelpp/asciidoctor-remote-include-processor/master/test/helloworld.cpp[tag=hello]
7272
----
7373

74+
=== Include a remote file partially using line ranges
75+
76+
In Asciidoctor we can include a source file partially using line ranges, see https://asciidoctor.org/docs/user-manual/#by-line-ranges[here].
77+
The extension enables this very feature.
78+
79+
++++
80+
<pre>
81+
<code class="language-cpp">
82+
[source,cpp]
83+
----
84+
include::https://raw.githubusercontent.com/feelpp/asciidoctor-remote-include-processor/master/test/helloworld.cpp[lines=3..8]
85+
----
86+
</code>
87+
</pre>
88+
++++
89+
90+
which gives:‡
91+
92+
[source,cpp]
93+
----
94+
include::https://raw.githubusercontent.com/feelpp/asciidoctor-remote-include-processor/master/test/helloworld.cpp[lines=3..8]
95+
----
96+
7497
== Acknowledgments
7598

7699
* https://github.com/djencks[@Djenks] on Gitter Antora/users for his many suggestions and explanations

0 commit comments

Comments
 (0)