asciidoctor 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of asciidoctor might be problematic. Click here for more details.

Files changed (53) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +1 -1
  3. data/LICENSE +2 -2
  4. data/README.adoc +461 -0
  5. data/asciidoctor.gemspec +27 -16
  6. data/compat/asciidoc.conf +139 -0
  7. data/lib/asciidoctor.rb +212 -69
  8. data/lib/asciidoctor/abstract_block.rb +41 -0
  9. data/lib/asciidoctor/abstract_node.rb +128 -81
  10. data/lib/asciidoctor/attribute_list.rb +5 -2
  11. data/lib/asciidoctor/backends/base_template.rb +16 -4
  12. data/lib/asciidoctor/backends/docbook45.rb +112 -42
  13. data/lib/asciidoctor/backends/html5.rb +206 -90
  14. data/lib/asciidoctor/block.rb +5 -5
  15. data/lib/asciidoctor/cli/invoker.rb +38 -34
  16. data/lib/asciidoctor/cli/options.rb +3 -3
  17. data/lib/asciidoctor/document.rb +115 -13
  18. data/lib/asciidoctor/helpers.rb +16 -0
  19. data/lib/asciidoctor/lexer.rb +486 -359
  20. data/lib/asciidoctor/path_resolver.rb +360 -0
  21. data/lib/asciidoctor/reader.rb +122 -23
  22. data/lib/asciidoctor/renderer.rb +1 -33
  23. data/lib/asciidoctor/section.rb +1 -1
  24. data/lib/asciidoctor/substituters.rb +103 -19
  25. data/lib/asciidoctor/version.rb +1 -1
  26. data/man/asciidoctor.1 +6 -6
  27. data/man/asciidoctor.ad +5 -3
  28. data/stylesheets/asciidoctor.css +274 -0
  29. data/test/attributes_test.rb +133 -10
  30. data/test/blocks_test.rb +302 -17
  31. data/test/document_test.rb +269 -6
  32. data/test/fixtures/basic-docinfo.html +1 -0
  33. data/test/fixtures/basic-docinfo.xml +4 -0
  34. data/test/fixtures/basic.asciidoc +4 -0
  35. data/test/fixtures/docinfo.html +1 -0
  36. data/test/fixtures/docinfo.xml +2 -0
  37. data/test/fixtures/include-file.asciidoc +22 -1
  38. data/test/fixtures/stylesheets/custom.css +3 -0
  39. data/test/invoker_test.rb +38 -6
  40. data/test/lexer_test.rb +64 -21
  41. data/test/links_test.rb +4 -0
  42. data/test/lists_test.rb +251 -12
  43. data/test/paragraphs_test.rb +225 -30
  44. data/test/paths_test.rb +174 -0
  45. data/test/reader_test.rb +89 -2
  46. data/test/sections_test.rb +518 -16
  47. data/test/substitutions_test.rb +121 -10
  48. data/test/tables_test.rb +53 -13
  49. data/test/test_helper.rb +2 -2
  50. data/test/text_test.rb +5 -5
  51. metadata +46 -50
  52. data/README.asciidoc +0 -296
  53. data/lib/asciidoctor/errors.rb +0 -5
@@ -100,8 +100,6 @@ class Renderer
100
100
  msg * "\n"
101
101
  }
102
102
  end
103
-
104
- @render_stack = []
105
103
  end
106
104
 
107
105
  # Public: Render an Asciidoc object with a specified view template.
@@ -110,43 +108,13 @@ class Renderer
110
108
  # object - the Object to be used as an evaluation scope.
111
109
  # locals - the optional Hash of locals to be passed to Tilt (default {}) (also ignored, really)
112
110
  def render(view, object, locals = {})
113
- @render_stack.push([view, object])
114
-
115
111
  if !@views.has_key? view
116
112
  raise "Couldn't find a view in @views for #{view}"
117
113
  else
118
114
  Debug.debug { "View for #{view} is #{@views[view]}, object is #{object}" }
119
115
  end
120
116
 
121
- ret = @views[view].render(object, locals)
122
-
123
- if @debug
124
- prefix = ''
125
- STDERR.puts '=' * 80
126
- STDERR.puts "Rendering:"
127
- @render_stack.each do |stack_view, stack_obj|
128
- obj_info = case stack_obj
129
- when Section; "SECTION #{stack_obj.title}"
130
- when Block;
131
- if stack_obj.context == :dlist
132
- dt_list = stack_obj.buffer.map{|dt,dd| dt.content.strip}.join(', ')
133
- "BLOCK :dlist (#{dt_list})"
134
- #else
135
- # "BLOCK #{stack_obj.context.inspect}"
136
- end
137
- else stack_obj.class
138
- end
139
- STDERR.puts "#{prefix}#{stack_view}: #{obj_info}"
140
- prefix << ' '
141
- end
142
- STDERR.puts '-' * 80
143
- #STDERR.puts ret.inspect
144
- STDERR.puts '=' * 80
145
- STDERR.puts
146
- end
147
-
148
- @render_stack.pop
149
- ret
117
+ @views[view].render(object, locals)
150
118
  end
151
119
 
152
120
  def views
@@ -72,6 +72,7 @@ class Section < AbstractBlock
72
72
  def generate_id
73
73
  if @document.attr? 'sectids'
74
74
  separator = @document.attr('idseparator', '_')
75
+ # FIXME define constants for these regexps
75
76
  base_id = @document.attr('idprefix', '_') + title.downcase.gsub(/&#[0-9]+;/, separator).
76
77
  gsub(/\W+/, separator).tr_s(separator, separator).chomp(separator)
77
78
  gen_id = base_id
@@ -80,7 +81,6 @@ class Section < AbstractBlock
80
81
  gen_id = "#{base_id}#{separator}#{cnt}"
81
82
  cnt += 1
82
83
  end
83
- @document.register(:ids, [gen_id, title])
84
84
  gen_id
85
85
  else
86
86
  nil
@@ -92,7 +92,9 @@ module Substituters
92
92
  #
93
93
  # returns - A String with literal (verbatim) substitutions performed
94
94
  def apply_literal_subs(lines)
95
- if @document.attributes['basebackend'] == 'html' && attr('style') == 'source' &&
95
+ if attr? 'subs'
96
+ apply_subs(lines.join, resolve_subs(attr 'subs'))
97
+ elsif @document.attributes['basebackend'] == 'html' && attr('style') == 'source' &&
96
98
  @document.attributes['source-highlighter'] == 'coderay' && attr?('language')
97
99
  sub_callouts(highlight_source(lines.join))
98
100
  else
@@ -109,11 +111,24 @@ module Substituters
109
111
  apply_subs(text, [:specialcharacters, :attributes])
110
112
  end
111
113
 
114
+ # Public: Apply explicit substitutions, if specified, otherwise normal substitutions.
115
+ #
116
+ # lines - The lines of text to process. Can be a String or a String Array
117
+ #
118
+ # returns - A String with substitutions applied
119
+ def apply_para_subs(lines)
120
+ if attr? 'subs'
121
+ apply_subs(lines.join, resolve_subs(attr 'subs'))
122
+ else
123
+ apply_subs(lines.join)
124
+ end
125
+ end
126
+
112
127
  # Public: Apply substitutions for passthrough text
113
128
  #
114
129
  # lines - A String Array containing the lines of text process
115
130
  #
116
- # returns - A String Array with passthrough substitutions performed
131
+ # returns - A String with passthrough substitutions performed
117
132
  def apply_passthrough_subs(lines)
118
133
  if attr? 'subs'
119
134
  subs = resolve_subs(attr('subs'))
@@ -222,8 +237,24 @@ module Substituters
222
237
  def sub_replacements(text)
223
238
  result = text.dup
224
239
 
225
- REPLACEMENTS.each {|pattern, replacement|
226
- result.gsub!(pattern, replacement)
240
+ REPLACEMENTS.each {|pattern, replacement, restore|
241
+ result.gsub!(pattern) {
242
+ matched = $&
243
+ head = $1
244
+ tail = $2
245
+ if matched.include?('\\')
246
+ matched.tr('\\', '')
247
+ else
248
+ case restore
249
+ when :none
250
+ replacement
251
+ when :leading
252
+ "#{head}#{replacement}"
253
+ when :bounding
254
+ "#{head}#{replacement}#{tail}"
255
+ end
256
+ end
257
+ }
227
258
  }
228
259
 
229
260
  result
@@ -298,6 +329,7 @@ module Substituters
298
329
  found[:square_bracket] = result.include?('[')
299
330
  found[:round_bracket] = result.include?('(')
300
331
  found[:colon] = result.include?(':')
332
+ found[:at] = result.include?('@')
301
333
  found[:macroish] = (found[:square_bracket] && found[:colon])
302
334
  found[:macroish_short_form] = (found[:square_bracket] && found[:colon] && result.include?(':['))
303
335
  found[:uri] = (found[:colon] && result.include?('://'))
@@ -314,8 +346,8 @@ module Substituters
314
346
  end
315
347
  target = sub_attributes(m[1])
316
348
  @document.register(:images, target)
317
- attrs = parse_attributes(m[2], ['alt', 'width', 'height'])
318
- if !attrs.has_key?('alt') || attrs['alt'].empty?
349
+ attrs = parse_attributes(unescape_bracketed_text(m[2]), ['alt', 'width', 'height'])
350
+ if !attrs['alt']
319
351
  attrs['alt'] = File.basename(target, File.extname(target))
320
352
  end
321
353
  Inline.new(self, :image, nil, :target => target, :attributes => attrs).render
@@ -333,7 +365,7 @@ module Substituters
333
365
  next m[0][1..-1]
334
366
  end
335
367
 
336
- terms = (m[1] || m[2]).strip.tr("\n", ' ').gsub('\]', ']').split(REGEXP[:csv_delimiter])
368
+ terms = unescape_bracketed_text(m[1] || m[2]).split(REGEXP[:csv_delimiter])
337
369
  document.register(:indexterms, [*terms])
338
370
  Inline.new(self, :indexterm, text, :attributes => {'terms' => terms}).render
339
371
  }
@@ -348,7 +380,7 @@ module Substituters
348
380
  next m[0][1..-1]
349
381
  end
350
382
 
351
- text = (m[1] || m[2]).strip.tr("\n", ' ').gsub('\]', ']')
383
+ text = unescape_bracketed_text(m[1] || m[2])
352
384
  document.register(:indexterms, [text])
353
385
  Inline.new(self, :indexterm, text, :type => :visible).render
354
386
  }
@@ -369,12 +401,14 @@ module Substituters
369
401
  end
370
402
  prefix = (m[1] != 'link:' ? m[1] : '')
371
403
  target = m[2]
404
+ suffix = ''
372
405
  # strip the <> around the link
373
- if prefix.end_with? '&lt;'
374
- prefix = prefix[0..-5]
375
- end
376
- if target.end_with? '&gt;'
406
+ if prefix.start_with?('&lt;') && target.end_with?('&gt;')
407
+ prefix = prefix[4..-1]
377
408
  target = target[0..-5]
409
+ elsif prefix.start_with?('(') && target.end_with?(')')
410
+ target = target[0..-2]
411
+ suffix = ')'
378
412
  end
379
413
  @document.register(:links, target)
380
414
 
@@ -391,11 +425,11 @@ module Substituters
391
425
  text = ''
392
426
  end
393
427
 
394
- "#{prefix}#{Inline.new(self, :anchor, (!text.empty? ? text : target), :type => :link, :target => target, :attributes => attrs).render}"
428
+ "#{prefix}#{Inline.new(self, :anchor, (!text.empty? ? text : target), :type => :link, :target => target, :attributes => attrs).render}#{suffix}"
395
429
  }
396
430
  end
397
431
 
398
- if found[:macroish] && result.include?('link:')
432
+ if found[:macroish] && (result.include?('link:') || result.include?('mailto:'))
399
433
  # inline link macros, link:target[text]
400
434
  result.gsub!(REGEXP[:link_macro]) {
401
435
  # alias match for Ruby 1.8.7 compat
@@ -404,19 +438,51 @@ module Substituters
404
438
  if m[0].start_with? '\\'
405
439
  next m[0][1..-1]
406
440
  end
407
- target = m[1]
408
- @document.register(:links, target)
441
+ raw_target = m[1]
442
+ mailto = m[0].start_with?('mailto:')
443
+ target = mailto ? "mailto:#{raw_target}" : raw_target
409
444
 
410
445
  attrs = nil
411
446
  #text = sub_attributes(m[2].gsub('\]', ']'))
412
447
  if link_attrs && (m[2].start_with?('"') || m[2].include?(','))
413
448
  attrs = parse_attributes(sub_attributes(m[2].gsub('\]', ']')))
414
449
  text = attrs[1]
450
+ if mailto
451
+ if attrs.has_key? 2
452
+ target = "#{target}?subject=#{Helpers.encode_uri(attrs[2])}"
453
+
454
+ if attrs.has_key? 3
455
+ target = "#{target}&amp;body=#{Helpers.encode_uri(attrs[3])}"
456
+ end
457
+ end
458
+ end
415
459
  else
416
460
  text = sub_attributes(m[2].gsub('\]', ']'))
417
461
  end
462
+ # QUESTION should a mailto be registered as an e-mail address?
463
+ @document.register(:links, target)
418
464
 
419
- Inline.new(self, :anchor, (!text.empty? ? text : target), :type => :link, :target => target, :attributes => attrs).render
465
+ Inline.new(self, :anchor, (!text.empty? ? text : raw_target), :type => :link, :target => target, :attributes => attrs).render
466
+ }
467
+ end
468
+
469
+ if found[:at]
470
+ result.gsub!(REGEXP[:email_inline]) {
471
+ # alias match for Ruby 1.8.7 compat
472
+ m = $~
473
+ address = m[0]
474
+ case address[0..0]
475
+ when '\\'
476
+ next address[1..-1]
477
+ when '>', ':'
478
+ next address
479
+ end
480
+
481
+ target = "mailto:#{address}"
482
+ # QUESTION should this be registered as an e-mail address?
483
+ @document.register(:links, target)
484
+
485
+ Inline.new(self, :anchor, address, :type => :link, :target => target).render
420
486
  }
421
487
  end
422
488
 
@@ -573,11 +639,29 @@ module Substituters
573
639
  # posattrs - The keys for positional attributes
574
640
  #
575
641
  # returns nil if attrline is nil, an empty Hash if attrline is empty, otherwise a Hash of parsed attributes
576
- def parse_attributes(attrline, posattrs = ['role'])
642
+ def parse_attributes(attrline, posattrs = ['role'], opts = {})
577
643
  return nil if attrline.nil?
578
644
  return {} if attrline.empty?
645
+ attrline = @document.sub_attributes(attrline) if opts[:sub_input]
646
+ attrline = unescape_bracketed_text(attrline) if opts[:unescape_input]
647
+ block = nil
648
+ if opts.fetch(:sub_result, true)
649
+ # substitutions are only performed on attribute values if block is not nil
650
+ block = self
651
+ end
579
652
 
580
- AttributeList.new(attrline, self).parse(posattrs)
653
+ if opts.has_key?(:into)
654
+ AttributeList.new(attrline, block).parse_into(opts[:into], posattrs)
655
+ else
656
+ AttributeList.new(attrline, block).parse(posattrs)
657
+ end
658
+ end
659
+
660
+ # Internal: Strip bounding whitespace, fold endlines and unescaped closing
661
+ # square brackets from text extracted from brackets
662
+ def unescape_bracketed_text(text)
663
+ return '' if text.empty?
664
+ text.strip.tr("\n", ' ').gsub('\]', ']')
581
665
  end
582
666
 
583
667
  # Internal: Resolve the list of comma-delimited subs against the possible options.
@@ -1,3 +1,3 @@
1
1
  module Asciidoctor
2
- VERSION = "0.1.1"
2
+ VERSION = '0.1.2'
3
3
  end
@@ -1,13 +1,13 @@
1
1
  '\" t
2
2
  .\" Title: asciidoctor
3
3
  .\" Author: [see the "AUTHORS" section]
4
- .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5
- .\" Date: 02/18/2013
4
+ .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
5
+ .\" Date: 04/25/2013
6
6
  .\" Manual: \ \&
7
7
  .\" Source: \ \&
8
8
  .\" Language: English
9
9
  .\"
10
- .TH "ASCIIDOCTOR" "1" "02/18/2013" "\ \&" "\ \&"
10
+ .TH "ASCIIDOCTOR" "1" "04/25/2013" "\ \&" "\ \&"
11
11
  .\" -----------------------------------------------------------------
12
12
  .\" * Define some portability stuff
13
13
  .\" -----------------------------------------------------------------
@@ -127,7 +127,7 @@ Compact the output by removing blank lines\&. Not enabled by default\&.
127
127
  .PP
128
128
  \fB\-D, \-\-destination\-dir\fR=\fIDIR\fR
129
129
  .RS 4
130
- Destination output directory\&. Defaults to the directory containing the source file, or the working directory if the source is read from a stream\&.
130
+ Destination output directory\&. Defaults to the directory containing the source file, or the working directory if the source is read from a stream\&. If specified, the directory is resolved relative to the working directory\&.
131
131
  .RE
132
132
  .PP
133
133
  \fB\-e, \-\-eruby\fR
@@ -154,7 +154,7 @@ extension\&. If the input is read from standard input, then the output file defa
154
154
  \fIOUT_FILE\fR
155
155
  is
156
156
  \fI\-\fR
157
- then the standard output is also used\&.
157
+ then the standard output is also used\&. If specified, the file is resolved relative to the working directory\&.
158
158
  .RE
159
159
  .PP
160
160
  \fB\-s, \-\-no\-header\-footer\fR
@@ -218,4 +218,4 @@ GitHub organization: <\fBhttp://github\&.com/asciidoctor\fR>
218
218
  Mailinglist / forum: <\fBhttp://discuss\&.asciidoctor\&.org\fR>
219
219
  .SH "COPYING"
220
220
  .sp
221
- Copyright (C) Ryan Waldron\&. Free use of this software is granted under the terms of the MIT License\&.
221
+ Copyright (C) Ryan Waldron and Dan Allen\&. Free use of this software is granted under the terms of the MIT License\&.
@@ -80,6 +80,7 @@ Rendering Control
80
80
  *-D, --destination-dir*='DIR'::
81
81
  Destination output directory. Defaults to the directory containing the
82
82
  source file, or the working directory if the source is read from a stream.
83
+ If specified, the directory is resolved relative to the working directory.
83
84
 
84
85
  *-e, --eruby*::
85
86
  Specifies the eRuby implementation to use for rendering the built-in
@@ -92,7 +93,8 @@ Rendering Control
92
93
  Write output to file 'OUT_FILE'. Defaults to the base name of the input
93
94
  file suffixed with 'backend' extension. If the input is read from standard
94
95
  input, then the output file defaults to stdout. If 'OUT_FILE' is '-' then
95
- the standard output is also used.
96
+ the standard output is also used. If specified, the file is resolved
97
+ relative to the working directory.
96
98
 
97
99
  *-s, --no-header-footer*::
98
100
  Suppress the document header and footer in the output.
@@ -158,5 +160,5 @@ Mailinglist / forum: <**http://discuss.asciidoctor.org**>
158
160
 
159
161
  COPYING
160
162
  -------
161
- Copyright \(C) Ryan Waldron. Free use of this software is granted under the
162
- terms of the MIT License.
163
+ Copyright \(C) Ryan Waldron and Dan Allen. Free use of this software is granted
164
+ under the terms of the MIT License.
@@ -0,0 +1,274 @@
1
+ /* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */
2
+ article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; }
3
+ audio, canvas, video { display: inline-block; }
4
+ audio:not([controls]) { display: none; height: 0; }
5
+ [hidden] { display: none; }
6
+ html { font-family: sans-serif; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
7
+ body { margin: 0; }
8
+ a:focus { outline: thin dotted; }
9
+ a:active, a:hover { outline: 0; }
10
+ h1 { font-size: 2em; margin: 0.67em 0; }
11
+ abbr[title] { border-bottom: 1px dotted; }
12
+ b, strong { font-weight: bold; }
13
+ dfn { font-style: italic; }
14
+ hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; }
15
+ mark { background: #ff0; color: #000; }
16
+ code, tt, kbd, pre, samp { font-family: monospace, serif; font-size: 1em; }
17
+ pre { white-space: pre-wrap; }
18
+ q { quotes: "\201C" "\201D" "\2018" "\2019"; }
19
+ small { font-size: 80%; }
20
+ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
21
+ sup { top: -0.5em; }
22
+ sub { bottom: -0.25em; }
23
+ img { border: 0; }
24
+ svg:not(:root) { overflow: hidden; }
25
+ figure { margin: 0; }
26
+ fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; }
27
+ legend { border: 0; padding: 0; }
28
+ button, input, select, textarea { font-family: inherit; font-size: 100%; margin: 0; }
29
+ button, input { line-height: normal; }
30
+ button, select { text-transform: none; }
31
+ button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer; }
32
+ button[disabled], html input[disabled] { cursor: default; }
33
+ input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; }
34
+ input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }
35
+ input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
36
+ button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
37
+ textarea { overflow: auto; vertical-align: top; }
38
+ table { border-collapse: collapse; border-spacing: 0; }
39
+ *, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }
40
+ html, body { font-size: 100%; }
41
+ body { background: white; color: #222222; padding: 0; margin: 0; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-weight: normal; font-style: normal; line-height: 1; position: relative; }
42
+ a:focus { outline: none; }
43
+ img, object, embed { max-width: 100%; height: auto; }
44
+ object, embed { height: 100%; }
45
+ img { -ms-interpolation-mode: bicubic; }
46
+ #map_canvas img, #map_canvas embed, #map_canvas object, .map_canvas img, .map_canvas embed, .map_canvas object { max-width: none !important; }
47
+ .left { float: left !important; }
48
+ .right { float: right !important; }
49
+ .text-left { text-align: left !important; }
50
+ .text-right { text-align: right !important; }
51
+ .text-center { text-align: center !important; }
52
+ .text-justify { text-align: justify !important; }
53
+ .hide { display: none; }
54
+ .antialiased, body { -webkit-font-smoothing: antialiased; }
55
+ img { display: inline-block; }
56
+ textarea { height: auto; min-height: 50px; }
57
+ select { width: 100%; }
58
+ p.lead, #preamble > .sectionbody > .paragraph:first-of-type p { font-size: 1.21875em; line-height: 1.6; }
59
+ .subheader, .admonitionblock td.content > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, .sidebarblock > .title, .tableblock > .title, .verseblock > .title, .ulist > .title, .olist > .title, .dlist > .title, .qlist > .title, .tableblock > caption { line-height: 1.4; color: #7a2518; font-weight: 300; margin-top: 0.2em; margin-bottom: 0.5em; }
60
+ div, dl, dt, dd, ul, ol, li, h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6, pre, form, p, blockquote, th, td { margin: 0; padding: 0; direction: ltr; }
61
+ a { color: #005498; text-decoration: underline; line-height: inherit; }
62
+ a:hover, a:focus { color: #00467f; }
63
+ a img { border: none; }
64
+ p { font-family: inherit; font-weight: normal; font-size: 1em; line-height: 1.6; margin-bottom: 1.25em; text-rendering: optimizeLegibility; }
65
+ p aside { font-size: 0.875em; line-height: 1.35; font-style: italic; }
66
+ h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { font-family: "Lucida Grande", Georgia, Verdana, "Helvetica", Helvetica, Arial, sans-serif; font-weight: normal; font-style: normal; color: #ba3925; text-rendering: optimizeLegibility; margin-top: 1em; margin-bottom: 0.5em; line-height: 1.2125em; }
67
+ h1 small, h2 small, h3 small, #toctitle small, .sidebarblock > .content > .title small, h4 small, h5 small, h6 small { font-size: 60%; color: #e99b8f; line-height: 0; }
68
+ h1 { font-size: 2.125em; }
69
+ h2 { font-size: 1.6875em; }
70
+ h3, #toctitle, .sidebarblock > .content > .title { font-size: 1.375em; }
71
+ h4 { font-size: 1.125em; }
72
+ h5 { font-size: 1.125em; }
73
+ h6 { font-size: 1em; }
74
+ hr { border: solid #dddddd; border-width: 1px 0 0; clear: both; margin: 1.25em 0 1.1875em; height: 0; }
75
+ em, i { font-style: italic; line-height: inherit; }
76
+ strong, b { font-weight: bold; line-height: inherit; }
77
+ small { font-size: 60%; line-height: inherit; }
78
+ code, tt { font-family: Consolas, "Liberation Mono", Courier, monospace; font-weight: normal; color: #6d180b; }
79
+ ul, ol, dl { font-size: 1em; line-height: 1.6; margin-bottom: 1.25em; list-style-position: outside; font-family: inherit; }
80
+ ul li ul, ul li ol { margin-left: 1.5em; margin-bottom: 0; font-size: 1em; }
81
+ ul.square li ul, ul.circle li ul, ul.disc li ul { list-style: inherit; }
82
+ ul.square { list-style-type: square; }
83
+ ul.circle { list-style-type: circle; }
84
+ ul.disc { list-style-type: disc; }
85
+ ul.no-bullet { list-style: none; }
86
+ ol li ul, ol li ol { margin-left: 1.5em; margin-bottom: 0; }
87
+ dl dt { margin-bottom: 0.3125em; font-weight: bold; }
88
+ dl dd { margin-bottom: 1.25em; }
89
+ abbr, acronym { text-transform: uppercase; font-size: 90%; color: #222222; border-bottom: 1px dotted #dddddd; cursor: help; }
90
+ abbr { text-transform: none; }
91
+ blockquote { margin: 0 0 1.25em; padding: 0.5625em 1.25em 0 1.1875em; border-left: 1px solid #dddddd; }
92
+ blockquote cite { display: block; font-size: inherit; color: #555555; }
93
+ blockquote cite:before { content: "\2014 \0020"; }
94
+ blockquote cite a, blockquote cite a:visited { color: #555555; }
95
+ blockquote, blockquote p { line-height: 1.6; color: #6f6f6f; }
96
+ .vcard { display: inline-block; margin: 0 0 1.25em 0; border: 1px solid #dddddd; padding: 0.625em 0.75em; }
97
+ .vcard li { margin: 0; display: block; }
98
+ .vcard .fn { font-weight: bold; font-size: 0.9375em; }
99
+ .vevent .summary { font-weight: bold; }
100
+ .vevent abbr { cursor: default; text-decoration: none; font-weight: bold; border: none; padding: 0 0.0625em; }
101
+ @media only screen and (min-width: 48em) { h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { line-height: 1.4; }
102
+ h1 { font-size: 2.75em; }
103
+ h2 { font-size: 2.3125em; }
104
+ h3, #toctitle, .sidebarblock > .content > .title { font-size: 1.6875em; }
105
+ h4 { font-size: 1.4375em; } }
106
+ .print-only { display: none !important; }
107
+ @media print { * { background: transparent !important; color: #000 !important; box-shadow: none !important; text-shadow: none !important; }
108
+ a, a:visited { text-decoration: underline; }
109
+ a[href]:after { content: " (" attr(href) ")"; }
110
+ abbr[title]:after { content: " (" attr(title) ")"; }
111
+ .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
112
+ pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
113
+ thead { display: table-header-group; }
114
+ tr, img { page-break-inside: avoid; }
115
+ img { max-width: 100% !important; }
116
+ @page { margin: 0.5cm; }
117
+ p, h2, h3, #toctitle, .sidebarblock > .content > .title { orphans: 3; widows: 3; }
118
+ h2, h3, #toctitle, .sidebarblock > .content > .title { page-break-after: avoid; }
119
+ .hide-on-print { display: none !important; }
120
+ .print-only { display: block !important; }
121
+ .hide-for-print { display: none !important; }
122
+ .show-for-print { display: inherit !important; } }
123
+ table { background: white; margin-bottom: 1.25em; border: solid 1px #dddddd; }
124
+ table thead, table tfoot { background: whitesmoke; font-weight: bold; }
125
+ table thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td { padding: 0.5em 0.625em 0.625em; font-size: inherit; color: #222222; text-align: left; }
126
+ table tr th, table tr td { padding: 0.5625em 0.625em; font-size: inherit; color: #222222; }
127
+ table tr.even, table tr.alt, table tr:nth-of-type(even) { background: #f9f9f9; }
128
+ table thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td { display: table-cell; line-height: 1.6; }
129
+ pre > code, pre > tt { color: #222222; }
130
+ tt { font-size: 0.9375em; padding: 1px 3px 0; white-space: nowrap; background-color: #f2f2f2; border: 1px solid #cccccc; -webkit-border-radius: 4px; border-radius: 4px; text-shadow: none; }
131
+ p a > tt { text-decoration: underline; }
132
+ p a > tt:hover { color: #561309; }
133
+ #header, #content, #footnotes, #footer { width: 100%; margin-left: auto; margin-right: auto; margin-top: 0; margin-bottom: 0; max-width: 62.5em; *zoom: 1; position: relative; padding-left: 0.9375em; padding-right: 0.9375em; }
134
+ #header:before, #header:after, #content:before, #content:after, #footnotes:before, #footnotes:after, #footer:before, #footer:after { content: " "; display: table; }
135
+ #header:after, #content:after, #footnotes:after, #footer:after { clear: both; }
136
+ #header { margin-bottom: 2.5em; }
137
+ #header > h1 { color: black; font-weight: normal; border-bottom: 1px solid #dddddd; margin-bottom: -28px; padding-bottom: 32px; }
138
+ #header span { color: #6f6f6f; }
139
+ #header #revnumber { text-transform: capitalize; }
140
+ #header br { display: none; }
141
+ #header br + span { padding-left: 3px; }
142
+ #header br + span:before { content: "\2013 \0020"; }
143
+ #toc { border-bottom: 3px double #ebebeb; padding-bottom: 1.25em; }
144
+ #toc > ol { margin-left: 0.25em; }
145
+ #toc ol { list-style-type: none; }
146
+ #toctitle { color: #7a2518; }
147
+ #footer { max-width: 100%; background-color: #222222; padding: 1.25em; }
148
+ #footer-text { color: #dddddd; line-height: 1.44; }
149
+ .sect1 { border-bottom: 3px double #ebebeb; padding-bottom: 1.25em; }
150
+ .sect1:last-of-type { border-bottom: 0; }
151
+ .admonitionblock td.content > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, .sidebarblock > .title, .tableblock > .title, .verseblock > .title, .ulist > .title, .olist > .title, .dlist > .title, .qlist > .title { text-align: left; font-weight: bold; }
152
+ .tableblock > caption { text-align: left; font-weight: bold; white-space: nowrap; overflow: visible; max-width: 0; }
153
+ table.tableblock #preamble > .sectionbody > .paragraph:first-of-type p { font-size: inherit; }
154
+ .admonitionblock > table { border: 0; background: none; width: 100%; }
155
+ .admonitionblock > table td.icon { text-align: center; width: 80px; }
156
+ .admonitionblock > table td.icon img { max-width: none; }
157
+ .admonitionblock > table td.icon .title { font-weight: bold; text-transform: uppercase; }
158
+ .admonitionblock > table td.content { padding-left: 1.125em; padding-right: 1.25em; border-left: 1px solid #dddddd; color: #6f6f6f; }
159
+ .admonitionblock > table td.content > .paragraph:last-child > p { margin-bottom: 0; }
160
+ .exampleblock > .content { border-style: solid; border-width: 1px; border-color: #e6e6e6; margin-bottom: 1.25em; padding: 1.25em; background: white; -webkit-border-radius: 4px; border-radius: 4px; }
161
+ .exampleblock > .content h1, .exampleblock > .content h2, .exampleblock > .content h3, .exampleblock > .content #toctitle, .sidebarblock.exampleblock > .content > .title, .exampleblock > .content h4, .exampleblock > .content h5, .exampleblock > .content h6, .exampleblock > .content p { color: #333333; }
162
+ .exampleblock > .content > :first-child { margin-top: 0; }
163
+ .exampleblock > .content > :last-child { margin-bottom: 0; }
164
+ .exampleblock > .content h1, .exampleblock > .content h2, .exampleblock > .content h3, .exampleblock > .content #toctitle, .sidebarblock.exampleblock > .content > .title, .exampleblock > .content h4, .exampleblock > .content h5, .exampleblock > .content h6 { line-height: 1; margin-bottom: 0.625em; }
165
+ .exampleblock > .content h1.subheader, .exampleblock > .content h2.subheader, .exampleblock > .content h3.subheader, .exampleblock > .content .subheader#toctitle, .sidebarblock.exampleblock > .content > .subheader.title, .exampleblock > .content h4.subheader, .exampleblock > .content h5.subheader, .exampleblock > .content h6.subheader { line-height: 1.4; }
166
+ .exampleblock > .content > :last-child > :last-child, .exampleblock > .content .olist > ol > li:last-child > :last-child, .exampleblock > .content .ulist > ul > li:last-child > :last-child { margin-bottom: 0; }
167
+ .exampleblock.result > .content { -webkit-box-shadow: 0 1px 8px #d9d9d9; box-shadow: 0 1px 8px #d9d9d9; }
168
+ .imageblock { margin-bottom: 1.25em; }
169
+ .sidebarblock { border-style: solid; border-width: 1px; border-color: #d9d9d9; margin-bottom: 1.25em; padding: 1.25em; background: #f2f2f2; -webkit-border-radius: 4px; border-radius: 4px; }
170
+ .sidebarblock h1, .sidebarblock h2, .sidebarblock h3, .sidebarblock #toctitle, .sidebarblock > .content > .title, .sidebarblock h4, .sidebarblock h5, .sidebarblock h6, .sidebarblock p { color: #333333; }
171
+ .sidebarblock > :first-child { margin-top: 0; }
172
+ .sidebarblock > :last-child { margin-bottom: 0; }
173
+ .sidebarblock h1, .sidebarblock h2, .sidebarblock h3, .sidebarblock #toctitle, .sidebarblock > .content > .title, .sidebarblock h4, .sidebarblock h5, .sidebarblock h6 { line-height: 1; margin-bottom: 0.625em; }
174
+ .sidebarblock h1.subheader, .sidebarblock h2.subheader, .sidebarblock h3.subheader, .sidebarblock .subheader#toctitle, .sidebarblock > .content > .subheader.title, .sidebarblock h4.subheader, .sidebarblock h5.subheader, .sidebarblock h6.subheader { line-height: 1.4; }
175
+ .sidebarblock > .content > .title { color: #7a2518; margin-top: 0; line-height: 1.6; }
176
+ .sidebarblock > .content > .paragraph:last-child p { margin-bottom: 0; }
177
+ .literalblock, .listingblock { margin-bottom: 1.25em; }
178
+ .literalblock > .content > pre, .listingblock > .content > pre { background: none; color: inherit; font-family: Consolas, "Liberation Mono", Courier, monospace; border-width: 1px 0; border-style: dotted; border-color: #bfbfbf; -webkit-border-radius: 4px; border-radius: 4px; padding: 0.75em 0.75em 0.5em 0.75em; white-space: pre; overflow-x: auto; line-height: 1.6; }
179
+ .literalblock > .content > pre > code, .literalblock > .content > pre > tt, .listingblock > .content > pre > code, .listingblock > .content > pre > tt { color: inherit; font-family: Consolas, "Liberation Mono", Courier, monospace; padding: 0; background: none; font-weight: normal; }
180
+ @media only screen { .literalblock > .content > pre, .listingblock > .content > pre { font-size: 0.8em; } }
181
+ @media only screen and (min-width: 48em) { .literalblock > .content > pre, .listingblock > .content > pre { font-size: 0.9em; } }
182
+ @media only screen and (min-width: 80em) { .literalblock > .content > pre, .listingblock > .content > pre { font-size: 1em; } }
183
+ .listingblock:hover .xml:before { content: "xml"; text-transform: uppercase; float: right; font-size: 0.9em; color: #999; }
184
+ .listingblock:hover .html:before { content: "html"; text-transform: uppercase; float: right; font-size: 0.9em; color: #999; }
185
+ .listingblock:hover .ruby:before { content: "ruby"; text-transform: uppercase; float: right; font-size: 0.9em; color: #999; }
186
+ .listingblock:hover .asciidoc:before { content: "asciidoc"; text-transform: uppercase; float: right; font-size: 0.9em; color: #999; }
187
+ .listingblock:hover .java:before { content: "java"; text-transform: uppercase; float: right; font-size: 0.9em; color: #999; }
188
+ .listingblock:hover .css:before { content: "css"; text-transform: uppercase; float: right; font-size: 0.9em; color: #999; }
189
+ .listingblock:hover .scss:before { content: "scss"; text-transform: uppercase; float: right; font-size: 0.9em; color: #999; }
190
+ .quoteblock { margin: 0 0 1.25em; padding: 0.5625em 1.25em 0 1.1875em; border-left: 1px solid #dddddd; }
191
+ .quoteblock blockquote { margin: 0 0 1.25em 0; padding: 0; border: 0; }
192
+ .quoteblock blockquote > .paragraph:last-child p { margin-bottom: 0; }
193
+ .quoteblock .attribution { padding-bottom: 0.5625em; font-size: inherit; color: #555555; }
194
+ .quoteblock .attribution br { display: none; }
195
+ .quoteblock .attribution cite { display: block; margin-bottom: 0.625em; }
196
+ table thead th, table tfoot th { font-weight: bold; }
197
+ table.tableblock.grid-all { border-collapse: separate; border-spacing: 1px; -webkit-border-radius: 4px; border-radius: 4px; border-top: 1px solid #dddddd; border-bottom: 1px solid #dddddd; }
198
+ table.tableblock.frame-topbot, table.tableblock.frame-none { border-left: 0; border-right: 0; }
199
+ table.tableblock.frame-sides, table.tableblock.frame-none { border-top: 0; border-bottom: 0; }
200
+ table.tableblock td .paragraph:last-child p, table.tableblock td > p:last-child { margin-bottom: 0; }
201
+ th.tableblock.halign-left, td.tableblock.halign-left { text-align: left; }
202
+ th.tableblock.halign-right, td.tableblock.halign-right { text-align: right; }
203
+ th.tableblock.halign-center, td.tableblock.halign-center { text-align: center; }
204
+ th.tableblock.halign-top, td.tableblock.halign-top { vertical-align: top; }
205
+ th.tableblock.halign-bottom, td.tableblock.halign-bottom { vertical-align: bottom; }
206
+ th.tableblock.halign-middle, td.tableblock.halign-middle { vertical-align: middle; }
207
+ p.tableblock.header { color: #222222; font-weight: bold; }
208
+ td > div.verse { white-space: pre; }
209
+ ul { margin-left: 1.75em; }
210
+ ol { margin-left: 1.875em; }
211
+ dl dd { margin-left: 1.125em; }
212
+ dl dd:last-child, dl dd:last-child > :last-child { margin-bottom: 0; }
213
+ .unstyled dl dt { font-weight: normal; font-style: normal; }
214
+ ol > li p, ul > li p, ul dd, ol dd { margin-bottom: 0.625em; }
215
+ ol.arabic { list-style-type: decimal; }
216
+ ol.loweralpha { list-style-type: lower-alpha; }
217
+ ol.upperalpha { list-style-type: upper-alpha; }
218
+ ol.lowerroman { list-style-type: lower-roman; }
219
+ ol.upperroman { list-style-type: upper-roman; }
220
+ .hdlist > table, .colist > table { border: 0; background: none; }
221
+ .hdlist > table > tbody > tr, .colist > table > tbody > tr { background: none; }
222
+ .literalblock + .colist, .listingblock + .colist { margin-top: -0.5em; }
223
+ .colist > table tr > td:first-of-type { padding: 0 .8em; line-height: 1; }
224
+ .colist > table tr > td:last-of-type { padding: 0.25em 0; }
225
+ td.hdlist1 { vertical-align: top; padding-right: .8em; }
226
+ .qanda > ol > li > p:first-child { color: #00467f; }
227
+ span.footnote, span.footnoteref { vertical-align: super; font-size: 0.875em; }
228
+ span.footnote a, span.footnoteref a { text-decoration: none; }
229
+ #footnotes { padding: 0.75em 0.375em; margin-bottom: 1.25em; border-top: 1px solid #dddddd; }
230
+ #footnotes hr { display: none; }
231
+ #footnotes .footnote { line-height: 1.3; font-size: 0.875em; margin-left: 1.2em; text-indent: -1.2em; margin-bottom: .2em; }
232
+ #footnotes .footnote a { font-weight: bold; text-decoration: none; }
233
+ #footnotes .footnote:last-of-type { margin-bottom: 0; }
234
+ .gist .file-data > table { border: none; background: #fff; width: 100%; margin-bottom: 0; }
235
+ .gist .file-data > table td.line-data { width: 99%; }
236
+ .unbreakable { page-break-inside: avoid; }
237
+ span.big { font-size: larger; }
238
+ span.small { font-size: smaller; }
239
+ span.underline { text-decoration: underline; }
240
+ span.overline { text-decoration: overline; }
241
+ span.line-through { text-decoration: line-through; }
242
+ span.aqua { color: #00bfbf; }
243
+ span.aqua-background { background-color: #00fafa; }
244
+ span.black { color: black; }
245
+ span.black-background { background-color: black; }
246
+ span.blue { color: #0000bf; }
247
+ span.blue-background { background-color: #0000fa; }
248
+ span.fuchsia { color: #bf00bf; }
249
+ span.fuchsia-background { background-color: #fa00fa; }
250
+ span.gray { color: #606060; }
251
+ span.gray-background { background-color: #7d7d7d; }
252
+ span.green { color: #006000; }
253
+ span.green-background { background-color: #007d00; }
254
+ span.lime { color: #00bf00; }
255
+ span.lime-background { background-color: #00fa00; }
256
+ span.maroon { color: #600000; }
257
+ span.maroon-background { background-color: #7d0000; }
258
+ span.navy { color: #000060; }
259
+ span.navy-background { background-color: #00007d; }
260
+ span.olive { color: #606000; }
261
+ span.olive-background { background-color: #7d7d00; }
262
+ span.purple { color: #600060; }
263
+ span.purple-background { background-color: #7d007d; }
264
+ span.red { color: #bf0000; }
265
+ span.red-background { background-color: #fa0000; }
266
+ span.silver { color: #909090; }
267
+ span.silver-background { background-color: #bcbcbc; }
268
+ span.teal { color: #006060; }
269
+ span.teal-background { background-color: #007d7d; }
270
+ span.white { color: #bfbfbf; }
271
+ span.white-background { background-color: #fafafa; }
272
+ span.yellow { color: #bfbf00; }
273
+ span.yellow-background { background-color: #fafa00; }
274
+ .literalblock > .content > pre, .listingblock > .content > pre { -webkit-border-radius: 0; border-radius: 0; }