File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,29 @@ In an Antora adoc page, include a remote file
3535include::https://raw.githubusercontent.com/feelpp/asciidoctor-remote-include-processor/master/test/helloworld.cpp[]
3636----
3737```
38+
3839which gives:
3940
4041[source,cpp]
4142----
4243include::https://raw.githubusercontent.com/feelpp/asciidoctor-remote-include-processor/master/test/helloworld.cpp[]
44+ ----
45+
46+ === Include a remote file partially using tags
47+
48+ In Asciidoctor we can include a source file partially using tags, see https://asciidoctor.org/docs/user-manual/#by-tagged-regions[here].
49+ The extension enable this very feature.
50+
51+ ```adoc
52+ [source,cpp]
53+ ----
54+ include::https://raw.githubusercontent.com/feelpp/asciidoctor-remote-include-processor/master/test/helloworld.cpp[tag=hello]
55+ ----
56+ ```
57+
58+ which gives:
59+
60+ [source,cpp]
61+ ----
62+ include::https://raw.githubusercontent.com/feelpp/asciidoctor-remote-include-processor/master/test/helloworld.cpp[tag=hello]
4363----
Original file line number Diff line number Diff line change 22
33int main (int argc, char ** argv )
44{
5+ // tag::hello[]
56 std::cout << " Hello World!" << std::endl;
7+ // end::hello[]
68}
You can’t perform that action at this time.
0 commit comments