从CLI运行AsciiDoctor会创建一个带有嵌入式样式表的 HTML文档: $asciidoctor mysample.adoc....titleMy First Experience with the Dangers of Documentation/titlestyle/* Asciidoctor default stylesheet | MIT License | http://asci
$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"> ...
documentation并不表示应该有任何差异.我错过了什么?
细节:
> Asciidoctor 0.1.4
> ruby 2.0.0p247
require 'asciidoctor' Asciidoctor.render_file('mysample.adoc', :in_place => true, :safe => 'unsafe')