从 CLI 运行 AsciiDoctor 会创建一个带有嵌入式样式表的 HTML 文档:
$ asciidoctor mysample.adoc
....
<title>My First Experience with the Dangers of Documentation</title>
<style>
/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */
article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; }
...
但是,在 Ruby 文件中运行 Asciidoctor 不会:
r.rb:
#!/usr/bin/env ruby
require 'asciidoctor'
Asciidoctor.render_file('mysample.adoc', :in_place => true)
$ ./r.rb
...
<title>My First Experience with the Dangers of Documentation</title>
<link rel="stylesheet" href="./asciidoctor.css">
...
该文档并未表明应该有任何区别。我错过了什么?
细节:
- Asciidoctor 0.1.4
- 红宝石 2.0.0p247