summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Allen <dallen@redhat.com>2013-04-25 16:17:53 -0600
committerDan Allen <dallen@redhat.com>2013-04-25 16:18:28 -0600
commitfcb110e734dd3db989aa9d6dbd2d6e37f55c9072 (patch)
tree048382a110354b1bf80b6929ed3f20bd6029fc1f /lib
parent21c601d103d2ad521b8a11571f82fc7304957adf (diff)
fix bug resolving custom stylesheet, add tests
Diffstat (limited to 'lib')
-rw-r--r--lib/asciidoctor/backends/html5.rb2
-rw-r--r--lib/asciidoctor/document.rb6
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/asciidoctor/backends/html5.rb b/lib/asciidoctor/backends/html5.rb
index 84f5d18b..37750e75 100644
--- a/lib/asciidoctor/backends/html5.rb
+++ b/lib/asciidoctor/backends/html5.rb
@@ -81,7 +81,7 @@ class DocumentTemplate < BaseTemplate
<% end %>
<% elsif attr? :stylesheet %>
<% if attr? 'linkcss' %>
- <link rel="stylesheet" href="<%= normalize_web_path(attr(:stylesdir, ''), (attr :stylesheet)) %>">
+ <link rel="stylesheet" href="<%= normalize_web_path((attr :stylesheet), attr(:stylesdir, '')) %>">
<% else %>
<style>
<%= read_asset normalize_system_path(attr(:stylesheet), attr(:stylesdir, '')) %>
diff --git a/lib/asciidoctor/document.rb b/lib/asciidoctor/document.rb
index 3a5d1205..5f0869b0 100644
--- a/lib/asciidoctor/document.rb
+++ b/lib/asciidoctor/document.rb
@@ -229,6 +229,12 @@ class Document < AbstractBlock
@attributes['backend'] ||= DEFAULT_BACKEND
@attributes['doctype'] ||= DEFAULT_DOCTYPE
update_backend_attributes
+ # make toc and numbered the default for the docbook backend
+ # FIXME this doesn't take into account the backend being set in the document
+ #if @attributes.has_key?('basebackend-docbook')
+ # @attributes['toc'] = '' unless @attribute_overrides.has_key?('toc!')
+ # @attributes['numbered'] = '' unless @attribute_overrides.has_key?('numbered!')
+ #end
if !@parent_document.nil?
# don't need to do the extra processing within our own document