Using non-standard extensions for included asciidoc files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Using non-standard extensions for included asciidoc files

mr_lp
I have a need to include files with asciidoc content that do not use the .adoc, .ad, .asciidoc, etc. extensions. When I include my files using the include macro, the files do not get fully processed as asciidoc files. I'm observing the following:

* the text is formatted as an AsciiDoc file (tables are rendered, headings appear correct)
* included files are not read in; the "include::filename" macro is left as plain text and included files for a table (CSV format) are ignored.

I came across this discussion that says this is an option being considered for implementation. I could not find the issue that addresses overriding the file extension, no other related issues, nor anything in the release notes.

Has this capability been implemented?

Thanks for the help.
Reply | Threaded
Open this post in threaded view
|

Re: Using non-standard extensions for included asciidoc files

mojavelinux
Administrator
The issue you're looking for is https://github.com/asciidoctor/asciidoctor/issues/848. It hasn't been implemented yet.

What I recommend is creating a custom include processor. You can see an example in the extensions lab.


You'll want to pass nil as the file name or use a fake name (the second argument to push include) so that the lines get processed as AsciiDoc.

-Dan

On Wed, Dec 30, 2015 at 2:12 PM, mr_lp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I have a need to include files with asciidoc content that do not use the .adoc, .ad, .asciidoc, etc. extensions. When I include my files using the include macro, the files do not get processed as asciidoc files.

I came across this discussion that says this is an option being considered for implementation, but could not find the issue that addresses overriding the file extension, nor anything in the release notes.

Has this capability been implemented? If not, can someone suggest an alternative approach?

Thanks for the help.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Using-non-standard-extensions-for-included-asciidoc-files-tp4136.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
|

Re: Using non-standard extensions for included asciidoc files

mr_lp
Thanks for the reply and the great work, Dan. I look forward to seeing either or both of those options discussed in #848 implemented in the near future. I'll look into the custom include process, but it may not be viable for this project. We may have to use one of the other AsciiDoc extensions instead.

-Larry.