|
Hello everyone,
The `include` directive can be used to include portions of a document either by specifying a line range or a set of tags. I wonder if it's possible to include a document by simply specifying an entry line and have the rest of the document included from there. My use case is to embed a source file but skipping the license header. An alternative would be to allow the following syntax (borrowed from Groovy) if both ends of the range must be specified include::source.java[12..-1] Thoughts? |
|
Someone May Say otherwise, but I'm pretty sure you can do a -1 on the last bit of the range. Ruby allows that as well and I remember talking about it.
—
Sent from Mailbox for iPhone On Sat, Feb 15, 2014 at 11:29 AM, aalmiray [via Asciidoctor :: Discussion] <[hidden email]> wrote:
|
|
Administrator
|
As Jason pointed out, your instinct was correct, Andres. You can use -1 to represent the last line of the document. Your example works. include::source.java[12..-1] I added this information to the user manual as it was previously missing. On Sat, Feb 15, 2014 at 11:42 AM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote: Someone May Say otherwise, but I'm pretty sure you can do a -1 on the last bit of the range. Ruby allows that as well and I remember talking about it. -- Dan Allen | http://google.com/profiles/dan.j.allen |
| Free forum by Nabble | Edit this page |
