如何将变量分离到外部 asciidoc 文档中?

How can I separate variables into an external asciidoc document?

我正在使用 asciidoctor 写一本书。文档看起来像这样。

book.asciidoc

:doctype: book
:icons: font
:source-highlighter: coderay

:apidocs-javase: http://docs.oracle.com/javase/8/docs/api
:apidocs-javaee: http://docs.oracle.com/javaee/7/api

include::chapter01.asciidoc[]

chapter01.asciidoc

== Chapter 01 TITLE
....
{apidocs-javase}/java/io/InputStream.html#...
...

它渲染得很好,结果看起来不错。

现在我正在尝试使用 Atom along with atom-asciidoc-preview. The problem is that atom-asciidoc-preview 似乎无法正确替换变量。

我试试这个。

variables.asciidoc

:apidocs-javase: http://docs.oracle.com/javase/8/docs/api
:apidocs-javaee: http://docs.oracle.com/javaee/7/api

chapter01.asciidoc

include::variables.asciidoc[]
== Chapter 01 TTILE
....
{apidocs-javase}/java/io/InputStream.html#...
...

我运气不好。我该如何解决这个问题?

应该可以,在 include 和 header 之间添加一个新行。也可能是原子没有正确处理它。