【问题标题】:Included files after list not rendered correctly列表后包含的文件未正确呈现
【发布时间】:2013-12-19 17:51:03
【问题描述】:

main.asc:

== Items
include::foo.asc[]
include::bar.asc[]

foo.asc

=== Foo Title
==== List of things
* thing one
* thing two

bar.asc

=== Bar Title
this is a summary of bar

main.asc被渲染时,会显示如下文本:

项目

Foo 标题

  • 一件事
  • 第二件事 === 栏标题

这是条的总结

我还尝试在列表后面的foo.asc 末尾添加一个简单的段落,看看这是否能解决问题——它没有。

有没有办法解决这个问题?

【问题讨论】:

    标签: textmate2 asciidoc


    【解决方案1】:

    在两个包含语句之间添加一行似乎可以解决问题:

    == Items
    include::foo.asc[]
    
    include::bar.asc[]
    

    【讨论】:

      【解决方案2】:

      您应该始终以空行结束所有 asciidoc 文件,实际上我在所有文件的末尾保留了注释以记住我:

      ////
      Always end a file with a blank line to avoid include problems.
      ////
      

      当您没有空行时,第二个文件包含在 previews 行的末尾,结果将是:

      thing two === Bar Title
      

      【讨论】:

        猜你喜欢
        • 2011-04-20
        • 1970-01-01
        • 2020-09-06
        • 1970-01-01
        • 2016-08-05
        • 1970-01-01
        • 2020-02-19
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多