hyla 1.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (404) hide show
  1. checksums.yaml +15 -0
  2. data/Gemfile.lock +35 -7
  3. data/README.adoc +10 -2
  4. data/bin/hyla +16 -13
  5. data/hyla.gemspec +6 -3
  6. data/lib/hyla.rb +5 -1
  7. data/lib/hyla/command.rb +12 -10
  8. data/lib/hyla/commands/create.rb +21 -12
  9. data/lib/hyla/commands/generate.rb +168 -59
  10. data/lib/hyla/commands/new.rb +36 -15
  11. data/lib/hyla/commands/watch.rb +6 -2
  12. data/lib/hyla/configuration.rb +169 -27
  13. data/lib/hyla/core_ext.rb +24 -0
  14. data/lib/hyla/project.rb +1 -1
  15. data/lib/resources/backends/haml/deckjs/block_admonition.html.haml +14 -0
  16. data/lib/resources/backends/haml/deckjs/block_audio.html.haml +7 -0
  17. data/lib/resources/backends/haml/deckjs/block_colist.html.haml +21 -0
  18. data/lib/resources/backends/haml/deckjs/block_dlist.html.haml +54 -0
  19. data/lib/resources/backends/haml/deckjs/block_example.haml.haml +5 -0
  20. data/lib/resources/backends/haml/deckjs/block_floating_title.html.haml +1 -0
  21. data/lib/resources/backends/haml/deckjs/block_image.html.haml +11 -0
  22. data/lib/resources/backends/haml/deckjs/block_listing.html.haml +32 -0
  23. data/lib/resources/backends/haml/deckjs/block_literal.html.haml +5 -0
  24. data/lib/resources/backends/haml/deckjs/block_olist.html.haml +11 -0
  25. data/lib/resources/backends/haml/deckjs/block_open.html.haml +5 -0
  26. data/lib/resources/backends/haml/deckjs/block_page_break.html.haml +1 -0
  27. data/lib/resources/backends/haml/deckjs/block_paragraph.html.haml +4 -0
  28. data/lib/resources/backends/haml/deckjs/block_pass.html.haml +1 -0
  29. data/lib/resources/backends/haml/deckjs/block_preamble.html.haml +3 -0
  30. data/lib/resources/backends/haml/deckjs/block_quote.html.haml +12 -0
  31. data/lib/resources/backends/haml/deckjs/block_ruler.html.haml +1 -0
  32. data/lib/resources/backends/haml/deckjs/block_sidebar.html.haml +5 -0
  33. data/lib/resources/backends/haml/deckjs/block_table.html.haml +48 -0
  34. data/lib/resources/backends/haml/deckjs/block_ulist.html.haml +25 -0
  35. data/lib/resources/backends/haml/deckjs/block_verse.html.haml +13 -0
  36. data/lib/resources/backends/haml/deckjs/block_video.html.haml +24 -0
  37. data/lib/resources/backends/haml/deckjs/document.html.haml +182 -0
  38. data/lib/resources/backends/haml/deckjs/embedded.html.haml +10 -0
  39. data/lib/resources/backends/haml/deckjs/inline_anchor.html.haml +12 -0
  40. data/lib/resources/backends/haml/deckjs/inline_break.html.haml +2 -0
  41. data/lib/resources/backends/haml/deckjs/inline_callout.html.haml +7 -0
  42. data/lib/resources/backends/haml/deckjs/inline_footnote.html.haml +8 -0
  43. data/lib/resources/backends/haml/deckjs/inline_image.html.haml +24 -0
  44. data/lib/resources/backends/haml/deckjs/inline_indexterm.html.haml +2 -0
  45. data/lib/resources/backends/haml/deckjs/inline_quoted.html.haml +19 -0
  46. data/lib/resources/backends/haml/deckjs/section.html.haml +7 -0
  47. data/lib/resources/backends/haml/docbook45/block_admonition.xml.haml +7 -0
  48. data/lib/resources/backends/haml/docbook45/block_colist.xml.haml +8 -0
  49. data/lib/resources/backends/haml/docbook45/block_dlist.xml.haml +61 -0
  50. data/lib/resources/backends/haml/docbook45/block_example.xml.haml +14 -0
  51. data/lib/resources/backends/haml/docbook45/block_floating_title.xml.haml +1 -0
  52. data/lib/resources/backends/haml/docbook45/block_image.xml.haml +8 -0
  53. data/lib/resources/backends/haml/docbook45/block_listing.xml.haml +14 -0
  54. data/lib/resources/backends/haml/docbook45/block_literal.xml.haml +7 -0
  55. data/lib/resources/backends/haml/docbook45/block_olist.xml.haml +8 -0
  56. data/lib/resources/backends/haml/docbook45/block_open.xml.haml +25 -0
  57. data/lib/resources/backends/haml/docbook45/block_page_break.xml.haml +1 -0
  58. data/lib/resources/backends/haml/docbook45/block_paragraph.xml.haml +6 -0
  59. data/lib/resources/backends/haml/docbook45/block_pass.xml.haml +1 -0
  60. data/lib/resources/backends/haml/docbook45/block_preamble.xml.haml +7 -0
  61. data/lib/resources/backends/haml/docbook45/block_quote.xml.haml +13 -0
  62. data/lib/resources/backends/haml/docbook45/block_ruler.xml.haml +2 -0
  63. data/lib/resources/backends/haml/docbook45/block_sidebar.xml.haml +7 -0
  64. data/lib/resources/backends/haml/docbook45/block_table.xml.haml +37 -0
  65. data/lib/resources/backends/haml/docbook45/block_ulist.xml.haml +18 -0
  66. data/lib/resources/backends/haml/docbook45/block_verse.xml.haml +10 -0
  67. data/lib/resources/backends/haml/docbook45/document.xml.haml +63 -0
  68. data/lib/resources/backends/haml/docbook45/embedded.xml.haml +1 -0
  69. data/lib/resources/backends/haml/docbook45/helpers.rb +7 -0
  70. data/lib/resources/backends/haml/docbook45/inline_anchor.xml.haml +13 -0
  71. data/lib/resources/backends/haml/docbook45/inline_break.xml.haml +2 -0
  72. data/lib/resources/backends/haml/docbook45/inline_callout.xml.haml +1 -0
  73. data/lib/resources/backends/haml/docbook45/inline_footnote.xml.haml +5 -0
  74. data/lib/resources/backends/haml/docbook45/inline_image.xml.haml +5 -0
  75. data/lib/resources/backends/haml/docbook45/inline_indexterm.xml.haml +18 -0
  76. data/lib/resources/backends/haml/docbook45/inline_quoted.xml.haml +21 -0
  77. data/lib/resources/backends/haml/docbook45/section.xml.haml +5 -0
  78. data/lib/resources/backends/haml/html5/block_admonition.html.haml +14 -0
  79. data/lib/resources/backends/haml/html5/block_audio.html.haml +7 -0
  80. data/lib/resources/backends/haml/html5/block_colist.html.haml +21 -0
  81. data/lib/resources/backends/haml/html5/block_dlist.html.haml +54 -0
  82. data/lib/resources/backends/haml/html5/block_example.haml.haml +5 -0
  83. data/lib/resources/backends/haml/html5/block_floating_title.html.haml +1 -0
  84. data/lib/resources/backends/haml/html5/block_image.html.haml +11 -0
  85. data/lib/resources/backends/haml/html5/block_listing.html.haml +31 -0
  86. data/lib/resources/backends/haml/html5/block_literal.html.haml +5 -0
  87. data/lib/resources/backends/haml/html5/block_math.html.haml +10 -0
  88. data/lib/resources/backends/haml/html5/block_olist.html.haml +9 -0
  89. data/lib/resources/backends/haml/html5/block_open.html.haml +15 -0
  90. data/lib/resources/backends/haml/html5/block_page_break.html.haml +1 -0
  91. data/lib/resources/backends/haml/html5/block_paragraph.html.haml +4 -0
  92. data/lib/resources/backends/haml/html5/block_pass.html.haml +1 -0
  93. data/lib/resources/backends/haml/html5/block_preamble.html.haml +6 -0
  94. data/lib/resources/backends/haml/html5/block_quote.html.haml +12 -0
  95. data/lib/resources/backends/haml/html5/block_ruler.html.haml +1 -0
  96. data/lib/resources/backends/haml/html5/block_sidebar.html.haml +5 -0
  97. data/lib/resources/backends/haml/html5/block_table.html.haml +47 -0
  98. data/lib/resources/backends/haml/html5/block_toc.html.haml +11 -0
  99. data/lib/resources/backends/haml/html5/block_ulist.html.haml +25 -0
  100. data/lib/resources/backends/haml/html5/block_verse.html.haml +13 -0
  101. data/lib/resources/backends/haml/html5/block_video.html.haml +27 -0
  102. data/lib/resources/backends/haml/html5/document.html.haml +114 -0
  103. data/lib/resources/backends/haml/html5/embedded.html.haml +10 -0
  104. data/lib/resources/backends/haml/html5/helpers.rb +7 -0
  105. data/lib/resources/backends/haml/html5/inline_anchor.html.haml +11 -0
  106. data/lib/resources/backends/haml/html5/inline_break.html.haml +2 -0
  107. data/lib/resources/backends/haml/html5/inline_button.html.haml +1 -0
  108. data/lib/resources/backends/haml/html5/inline_callout.html.haml +7 -0
  109. data/lib/resources/backends/haml/html5/inline_footnote.html.haml +8 -0
  110. data/lib/resources/backends/haml/html5/inline_image.html.haml +24 -0
  111. data/lib/resources/backends/haml/html5/inline_indexterm.html.haml +2 -0
  112. data/lib/resources/backends/haml/html5/inline_kbd.html.haml +8 -0
  113. data/lib/resources/backends/haml/html5/inline_menu.html.haml +15 -0
  114. data/lib/resources/backends/haml/html5/inline_quoted.html.haml +22 -0
  115. data/lib/resources/backends/haml/html5/section.html.haml +21 -0
  116. data/lib/resources/backends/haml/revealjs/block_image.html.haml +11 -0
  117. data/lib/resources/backends/haml/revealjs/block_olist.html.haml +8 -0
  118. data/lib/resources/backends/haml/revealjs/block_ulist.html.haml +8 -0
  119. data/lib/resources/backends/haml/revealjs/document.html.haml +61 -0
  120. data/lib/resources/backends/haml/revealjs/section.html.haml +10 -0
  121. data/lib/resources/backends/slim/docbook45/block_admonition.xml.slim +7 -0
  122. data/lib/resources/backends/slim/docbook45/block_colist.xml.slim +8 -0
  123. data/lib/resources/backends/slim/docbook45/block_dlist.xml.slim +61 -0
  124. data/lib/resources/backends/slim/docbook45/block_example.xml.slim +13 -0
  125. data/lib/resources/backends/slim/docbook45/block_floating_title.xml.slim +1 -0
  126. data/lib/resources/backends/slim/docbook45/block_image.xml.slim +7 -0
  127. data/lib/resources/backends/slim/docbook45/block_listing.xml.slim +14 -0
  128. data/lib/resources/backends/slim/docbook45/block_literal.xml.slim +7 -0
  129. data/lib/resources/backends/slim/docbook45/block_olist.xml.slim +8 -0
  130. data/lib/resources/backends/slim/docbook45/block_open.xml.slim +25 -0
  131. data/lib/resources/backends/slim/docbook45/block_page_break.xml.slim +1 -0
  132. data/lib/resources/backends/slim/docbook45/block_paragraph.xml.slim +6 -0
  133. data/lib/resources/backends/slim/docbook45/block_pass.xml.slim +1 -0
  134. data/lib/resources/backends/slim/docbook45/block_preamble.xml.slim +7 -0
  135. data/lib/resources/backends/slim/docbook45/block_quote.xml.slim +13 -0
  136. data/lib/resources/backends/slim/docbook45/block_ruler.xml.slim +2 -0
  137. data/lib/resources/backends/slim/docbook45/block_sidebar.xml.slim +7 -0
  138. data/lib/resources/backends/slim/docbook45/block_table.xml.slim +36 -0
  139. data/lib/resources/backends/slim/docbook45/block_ulist.xml.slim +18 -0
  140. data/lib/resources/backends/slim/docbook45/block_verse.xml.slim +10 -0
  141. data/lib/resources/backends/slim/docbook45/document.xml.slim +63 -0
  142. data/lib/resources/backends/slim/docbook45/embedded.xml.slim +1 -0
  143. data/lib/resources/backends/slim/docbook45/helpers.rb +9 -0
  144. data/lib/resources/backends/slim/docbook45/inline_anchor.xml.slim +13 -0
  145. data/lib/resources/backends/slim/docbook45/inline_break.xml.slim +2 -0
  146. data/lib/resources/backends/slim/docbook45/inline_callout.xml.slim +1 -0
  147. data/lib/resources/backends/slim/docbook45/inline_footnote.xml.slim +4 -0
  148. data/lib/resources/backends/slim/docbook45/inline_image.xml.slim +4 -0
  149. data/lib/resources/backends/slim/docbook45/inline_indexterm.xml.slim +16 -0
  150. data/lib/resources/backends/slim/docbook45/inline_quoted.xml.slim +21 -0
  151. data/lib/resources/backends/slim/docbook45/section.xml.slim +5 -0
  152. data/lib/resources/backends/slim/document.html.bk.slim +335 -0
  153. data/lib/resources/backends/slim/dzslides/block_admonition.html.slim +19 -0
  154. data/lib/resources/backends/slim/dzslides/block_colist.html.slim +20 -0
  155. data/lib/resources/backends/slim/dzslides/block_dlist.html.slim +10 -0
  156. data/lib/resources/backends/slim/dzslides/block_example.html.slim +4 -0
  157. data/lib/resources/backends/slim/dzslides/block_floating_title.html.slim +1 -0
  158. data/lib/resources/backends/slim/dzslides/block_image.html.slim +14 -0
  159. data/lib/resources/backends/slim/dzslides/block_listing.html.slim +8 -0
  160. data/lib/resources/backends/slim/dzslides/block_literal.html.slim +11 -0
  161. data/lib/resources/backends/slim/dzslides/block_olist.html.slim +6 -0
  162. data/lib/resources/backends/slim/dzslides/block_open.html.slim +4 -0
  163. data/lib/resources/backends/slim/dzslides/block_paragraph.html.slim +1 -0
  164. data/lib/resources/backends/slim/dzslides/block_pass.html.slim +1 -0
  165. data/lib/resources/backends/slim/dzslides/block_quote.html.slim +11 -0
  166. data/lib/resources/backends/slim/dzslides/block_ruler.html.slim +1 -0
  167. data/lib/resources/backends/slim/dzslides/block_table.html.slim +45 -0
  168. data/lib/resources/backends/slim/dzslides/block_ulist.html.slim +6 -0
  169. data/lib/resources/backends/slim/dzslides/block_verse.html.slim +12 -0
  170. data/lib/resources/backends/slim/dzslides/block_video.html.slim +6 -0
  171. data/lib/resources/backends/slim/dzslides/document.html.slim +67 -0
  172. data/lib/resources/backends/slim/dzslides/embedded.html.slim +1 -0
  173. data/lib/resources/backends/slim/dzslides/helpers.rb +9 -0
  174. data/lib/resources/backends/slim/dzslides/inline_anchor.html.slim +11 -0
  175. data/lib/resources/backends/slim/dzslides/inline_break.html.slim +2 -0
  176. data/lib/resources/backends/slim/dzslides/inline_callout.html.slim +7 -0
  177. data/lib/resources/backends/slim/dzslides/inline_footnote.html.slim +6 -0
  178. data/lib/resources/backends/slim/dzslides/inline_image.html.slim +24 -0
  179. data/lib/resources/backends/slim/dzslides/inline_indexterm.html.slim +2 -0
  180. data/lib/resources/backends/slim/dzslides/inline_kbd.html.slim +8 -0
  181. data/lib/resources/backends/slim/dzslides/inline_quoted.html.slim +23 -0
  182. data/lib/resources/backends/slim/dzslides/section.html.slim +4 -0
  183. data/lib/resources/backends/slim/html5/block_admonition.html.slim +13 -0
  184. data/lib/resources/backends/slim/html5/block_audio.html.slim +6 -0
  185. data/lib/resources/backends/slim/html5/block_colist.html.slim +20 -0
  186. data/lib/resources/backends/slim/html5/block_dlist.html.slim +53 -0
  187. data/lib/resources/backends/slim/html5/block_example.html.slim +4 -0
  188. data/lib/resources/backends/slim/html5/block_floating_title.html.slim +1 -0
  189. data/lib/resources/backends/slim/html5/block_image.html.slim +10 -0
  190. data/lib/resources/backends/slim/html5/block_listing.html.slim +31 -0
  191. data/lib/resources/backends/slim/html5/block_literal.html.slim +4 -0
  192. data/lib/resources/backends/slim/html5/block_math.html.slim +10 -0
  193. data/lib/resources/backends/slim/html5/block_olist.html.slim +9 -0
  194. data/lib/resources/backends/slim/html5/block_open.html.slim +15 -0
  195. data/lib/resources/backends/slim/html5/block_page_break.html.slim +1 -0
  196. data/lib/resources/backends/slim/html5/block_paragraph.html.slim +4 -0
  197. data/lib/resources/backends/slim/html5/block_pass.html.slim +1 -0
  198. data/lib/resources/backends/slim/html5/block_preamble.html.slim +6 -0
  199. data/lib/resources/backends/slim/html5/block_quote.html.slim +14 -0
  200. data/lib/resources/backends/slim/html5/block_ruler.html.slim +1 -0
  201. data/lib/resources/backends/slim/html5/block_sidebar.html.slim +5 -0
  202. data/lib/resources/backends/slim/html5/block_table.html.slim +45 -0
  203. data/lib/resources/backends/slim/html5/block_toc.html.slim +12 -0
  204. data/lib/resources/backends/slim/html5/block_ulist.html.slim +25 -0
  205. data/lib/resources/backends/slim/html5/block_verse.html.slim +14 -0
  206. data/lib/resources/backends/slim/html5/block_video.html.slim +27 -0
  207. data/lib/resources/backends/slim/html5/document.html.slim +112 -0
  208. data/lib/resources/backends/slim/html5/embedded.html.slim +9 -0
  209. data/lib/resources/backends/slim/html5/helpers.rb +8 -0
  210. data/lib/resources/backends/slim/html5/inline_anchor.html.slim +11 -0
  211. data/lib/resources/backends/slim/html5/inline_break.html.slim +2 -0
  212. data/lib/resources/backends/slim/html5/inline_button.html.slim +1 -0
  213. data/lib/resources/backends/slim/html5/inline_callout.html.slim +7 -0
  214. data/lib/resources/backends/slim/html5/inline_footnote.html.slim +6 -0
  215. data/lib/resources/backends/slim/html5/inline_image.html.slim +24 -0
  216. data/lib/resources/backends/slim/html5/inline_indexterm.html.slim +2 -0
  217. data/lib/resources/backends/slim/html5/inline_kbd.html.slim +8 -0
  218. data/lib/resources/backends/slim/html5/inline_menu.html.slim +15 -0
  219. data/lib/resources/backends/slim/html5/inline_quoted.html.slim +22 -0
  220. data/lib/resources/backends/slim/html5/section.html.slim +20 -0
  221. data/lib/resources/backends/slim/revealjs/block_admonition.html.slim +13 -0
  222. data/lib/resources/backends/slim/revealjs/block_audio.html.slim +6 -0
  223. data/lib/resources/backends/slim/revealjs/block_colist.html.slim +20 -0
  224. data/lib/resources/backends/slim/revealjs/block_dlist.html.slim +53 -0
  225. data/lib/resources/backends/slim/revealjs/block_example.html.slim +4 -0
  226. data/lib/resources/backends/slim/revealjs/block_floating_title.html.slim +1 -0
  227. data/lib/resources/backends/slim/revealjs/block_image.html.slim +10 -0
  228. data/lib/resources/backends/slim/revealjs/block_listing.html.slim +31 -0
  229. data/lib/resources/backends/slim/revealjs/block_literal.html.slim +4 -0
  230. data/lib/resources/backends/slim/revealjs/block_math.html.slim +10 -0
  231. data/lib/resources/backends/slim/revealjs/block_olist.html.slim +9 -0
  232. data/lib/resources/backends/slim/revealjs/block_open.html.slim +15 -0
  233. data/lib/resources/backends/slim/revealjs/block_page_break.html.slim +1 -0
  234. data/lib/resources/backends/slim/revealjs/block_paragraph.html.slim +4 -0
  235. data/lib/resources/backends/slim/revealjs/block_pass.html.slim +1 -0
  236. data/lib/resources/backends/slim/revealjs/block_preamble.html.slim +6 -0
  237. data/lib/resources/backends/slim/revealjs/block_quote.html.slim +14 -0
  238. data/lib/resources/backends/slim/revealjs/block_ruler.html.slim +1 -0
  239. data/lib/resources/backends/slim/revealjs/block_sidebar.html.slim +5 -0
  240. data/lib/resources/backends/slim/revealjs/block_table.html.slim +45 -0
  241. data/lib/resources/backends/slim/revealjs/block_toc.html.slim +12 -0
  242. data/lib/resources/backends/slim/revealjs/block_ulist.html.slim +25 -0
  243. data/lib/resources/backends/slim/revealjs/block_verse.html.slim +14 -0
  244. data/lib/resources/backends/slim/revealjs/block_video.html.slim +27 -0
  245. data/lib/resources/backends/slim/revealjs/document.html.slim +87 -0
  246. data/lib/resources/backends/slim/revealjs/embedded.html.slim +9 -0
  247. data/lib/resources/backends/slim/revealjs/helpers.rb +8 -0
  248. data/lib/resources/backends/slim/revealjs/inline_anchor.html.slim +11 -0
  249. data/lib/resources/backends/slim/revealjs/inline_break.html.slim +2 -0
  250. data/lib/resources/backends/slim/revealjs/inline_button.html.slim +1 -0
  251. data/lib/resources/backends/slim/revealjs/inline_callout.html.slim +7 -0
  252. data/lib/resources/backends/slim/revealjs/inline_footnote.html.slim +6 -0
  253. data/lib/resources/backends/slim/revealjs/inline_image.html.slim +24 -0
  254. data/lib/resources/backends/slim/revealjs/inline_indexterm.html.slim +2 -0
  255. data/lib/resources/backends/slim/revealjs/inline_kbd.html.slim +8 -0
  256. data/lib/resources/backends/slim/revealjs/inline_menu.html.slim +15 -0
  257. data/lib/resources/backends/slim/revealjs/inline_quoted.html.slim +22 -0
  258. data/lib/resources/backends/slim/revealjs/section.html.slim +3 -0
  259. data/lib/resources/deck.js/core/deck.core.css +407 -0
  260. data/lib/resources/deck.js/core/deck.core.js +498 -0
  261. data/lib/resources/deck.js/extensions/deck.js-blank/README.md +10 -0
  262. data/lib/resources/deck.js/extensions/deck.js-blank/deck.blank.js +33 -0
  263. data/lib/resources/deck.js/extensions/goto/deck.goto.css +41 -0
  264. data/lib/resources/deck.js/extensions/goto/deck.goto.html +7 -0
  265. data/lib/resources/deck.js/extensions/goto/deck.goto.js +170 -0
  266. data/lib/resources/deck.js/extensions/hash/deck.hash.css +13 -0
  267. data/lib/resources/deck.js/extensions/hash/deck.hash.html +2 -0
  268. data/lib/resources/deck.js/extensions/hash/deck.hash.js +142 -0
  269. data/lib/resources/deck.js/extensions/menu/deck.menu.css +47 -0
  270. data/lib/resources/deck.js/extensions/menu/deck.menu.js +187 -0
  271. data/lib/resources/deck.js/extensions/navigation/deck.navigation.css +43 -0
  272. data/lib/resources/deck.js/extensions/navigation/deck.navigation.html +3 -0
  273. data/lib/resources/deck.js/extensions/navigation/deck.navigation.js +92 -0
  274. data/lib/resources/deck.js/extensions/scale/deck.scale.css +28 -0
  275. data/lib/resources/deck.js/extensions/scale/deck.scale.js +170 -0
  276. data/lib/resources/deck.js/extensions/split/README.md +30 -0
  277. data/lib/resources/deck.js/extensions/split/deck.split.js +59 -0
  278. data/lib/resources/deck.js/extensions/status/deck.status.css +18 -0
  279. data/lib/resources/deck.js/extensions/status/deck.status.html +6 -0
  280. data/lib/resources/deck.js/extensions/status/deck.status.js +95 -0
  281. data/lib/resources/deck.js/extensions/toc/deck.toc.css +40 -0
  282. data/lib/resources/deck.js/extensions/toc/deck.toc.html +12 -0
  283. data/lib/resources/deck.js/extensions/toc/deck.toc.js +271 -0
  284. data/lib/resources/deck.js/jquery-1.7.2.min.js +4 -0
  285. data/lib/resources/deck.js/jquery.min.js +4 -0
  286. data/lib/resources/deck.js/modernizr.custom.js +4 -0
  287. data/lib/resources/deck.js/themes/style/beamer.css +286 -0
  288. data/lib/resources/deck.js/themes/style/neon.css +123 -0
  289. data/lib/resources/deck.js/themes/style/swiss.css +84 -0
  290. data/lib/resources/deck.js/themes/style/web-2.0.css +214 -0
  291. data/lib/resources/deck.js/themes/transition/beamer.css +66 -0
  292. data/lib/resources/deck.js/themes/transition/fade.css +43 -0
  293. data/lib/resources/deck.js/themes/transition/horizontal-slide.css +76 -0
  294. data/lib/resources/deck.js/themes/transition/vertical-slide.css +94 -0
  295. data/lib/resources/revealjs/LICENSE +19 -0
  296. data/lib/resources/revealjs/css/print/paper.css +176 -0
  297. data/lib/resources/revealjs/css/print/pdf.css +190 -0
  298. data/lib/resources/revealjs/css/reveal.css +1880 -0
  299. data/lib/resources/revealjs/css/reveal.min.css +7 -0
  300. data/lib/resources/revealjs/css/theme/README.md +25 -0
  301. data/lib/resources/revealjs/css/theme/beige.css +148 -0
  302. data/lib/resources/revealjs/css/theme/blood.css +175 -0
  303. data/lib/resources/revealjs/css/theme/default.css +148 -0
  304. data/lib/resources/revealjs/css/theme/moon.css +148 -0
  305. data/lib/resources/revealjs/css/theme/night.css +136 -0
  306. data/lib/resources/revealjs/css/theme/serif.css +138 -0
  307. data/lib/resources/revealjs/css/theme/simple.css +138 -0
  308. data/lib/resources/revealjs/css/theme/sky.css +145 -0
  309. data/lib/resources/revealjs/css/theme/solarized.css +148 -0
  310. data/lib/resources/revealjs/css/theme/source/beige.scss +50 -0
  311. data/lib/resources/revealjs/css/theme/source/blood.scss +91 -0
  312. data/lib/resources/revealjs/css/theme/source/default.scss +42 -0
  313. data/lib/resources/revealjs/css/theme/source/moon.scss +68 -0
  314. data/lib/resources/revealjs/css/theme/source/night.scss +35 -0
  315. data/lib/resources/revealjs/css/theme/source/serif.scss +35 -0
  316. data/lib/resources/revealjs/css/theme/source/simple.scss +38 -0
  317. data/lib/resources/revealjs/css/theme/source/sky.scss +46 -0
  318. data/lib/resources/revealjs/css/theme/source/solarized.scss +74 -0
  319. data/lib/resources/revealjs/css/theme/template/mixins.scss +29 -0
  320. data/lib/resources/revealjs/css/theme/template/settings.scss +34 -0
  321. data/lib/resources/revealjs/css/theme/template/theme.scss +170 -0
  322. data/lib/resources/revealjs/js/reveal.js +3382 -0
  323. data/lib/resources/revealjs/js/reveal.min.js +9 -0
  324. data/lib/resources/revealjs/lib/css/zenburn.css +114 -0
  325. data/lib/resources/revealjs/lib/font/league_gothic-webfont.eot +0 -0
  326. data/lib/resources/revealjs/lib/font/league_gothic-webfont.svg +230 -0
  327. data/lib/resources/revealjs/lib/font/league_gothic-webfont.ttf +0 -0
  328. data/lib/resources/revealjs/lib/font/league_gothic-webfont.woff +0 -0
  329. data/lib/resources/revealjs/lib/font/league_gothic_license +2 -0
  330. data/lib/resources/revealjs/lib/js/classList.js +2 -0
  331. data/lib/resources/revealjs/lib/js/head.min.js +8 -0
  332. data/lib/resources/revealjs/lib/js/html5shiv.js +7 -0
  333. data/lib/resources/revealjs/plugin/highlight/highlight.js +32 -0
  334. data/lib/resources/revealjs/plugin/leap/leap.js +157 -0
  335. data/lib/resources/revealjs/plugin/markdown/example.html +129 -0
  336. data/lib/resources/revealjs/plugin/markdown/example.md +31 -0
  337. data/lib/resources/revealjs/plugin/markdown/markdown.js +392 -0
  338. data/lib/resources/revealjs/plugin/markdown/marked.js +37 -0
  339. data/lib/resources/revealjs/plugin/math/math.js +64 -0
  340. data/lib/resources/revealjs/plugin/multiplex/client.js +13 -0
  341. data/lib/resources/revealjs/plugin/multiplex/index.js +56 -0
  342. data/lib/resources/revealjs/plugin/multiplex/master.js +51 -0
  343. data/lib/resources/revealjs/plugin/notes-server/client.js +57 -0
  344. data/lib/resources/revealjs/plugin/notes-server/index.js +59 -0
  345. data/lib/resources/revealjs/plugin/notes-server/notes.html +142 -0
  346. data/lib/resources/revealjs/plugin/notes/notes.html +267 -0
  347. data/lib/resources/revealjs/plugin/notes/notes.js +78 -0
  348. data/lib/resources/revealjs/plugin/postmessage/example.html +39 -0
  349. data/lib/resources/revealjs/plugin/postmessage/postmessage.js +42 -0
  350. data/lib/resources/revealjs/plugin/print-pdf/print-pdf.js +44 -0
  351. data/lib/resources/revealjs/plugin/remotes/remotes.js +39 -0
  352. data/lib/resources/revealjs/plugin/search/search.js +196 -0
  353. data/lib/resources/revealjs/plugin/zoom-js/zoom.js +258 -0
  354. data/lib/resources/styles/asciidoctor.css +652 -0
  355. data/lib/resources/styles/colony.css +660 -0
  356. data/lib/resources/styles/foundation-lime.css +657 -0
  357. data/lib/resources/styles/foundation-potion.css +657 -0
  358. data/lib/resources/styles/foundation.css +648 -0
  359. data/lib/resources/styles/github.css +669 -0
  360. data/lib/resources/styles/golo.css +669 -0
  361. data/lib/resources/styles/iconic.css +692 -0
  362. data/lib/resources/styles/maker.css +668 -0
  363. data/lib/resources/styles/readthedocs.css +669 -0
  364. data/lib/resources/styles/redhat.css +654 -0
  365. data/lib/resources/styles/riak.css +689 -0
  366. data/lib/resources/styles/rocket-panda.css +662 -0
  367. data/lib/resources/styles/rubygems.css +650 -0
  368. data/lib/templates/_config.yml +27 -0
  369. data/lib/templates/{training → book}/GemFile +2 -1
  370. data/lib/templates/{training → book}/development/audio/ocean_waves.mp3 +0 -0
  371. data/lib/templates/book/development/book.adoc +121 -0
  372. data/lib/templates/{training → book}/development/image/hyla_frog.jpg +0 -0
  373. data/lib/templates/{training → book}/development/video/small.ogv +0 -0
  374. data/lib/templates/{training → book}/introduction/audio/ocean_waves.mp3 +0 -0
  375. data/lib/templates/book/introduction/book.adoc +121 -0
  376. data/lib/templates/{training → book}/introduction/image/hyla_frog.jpg +0 -0
  377. data/lib/templates/{training → book}/introduction/video/small.ogv +0 -0
  378. data/lib/templates/book/readme.adoc +10 -0
  379. data/lib/templates/sample/asciidoc_article.adoc +101 -10
  380. data/lib/templates/sample/asciidoc_audio.adoc +1 -1
  381. data/lib/templates/sample/asciidoc_book.adoc +125 -0
  382. data/lib/templates/sample/asciidoc_image.adoc +26 -0
  383. data/lib/templates/sample/asciidoc_report.adoc +66 -0
  384. data/lib/templates/sample/asciidoc_source.adoc +53 -0
  385. data/lib/templates/sample/asciidoc_table.adoc +36 -0
  386. data/lib/templates/sample/asciidoc_video.adoc +9 -1
  387. data/lib/templates/sample/slideshow_revealjs.adoc +26 -0
  388. data/lib/templates/training-exercises/_config.yml +3 -0
  389. data/lib/templates/training/{introduction → module-1}/article.adoc +7 -2
  390. data/lib/templates/training/module-1/audio/ocean_waves.mp3 +0 -0
  391. data/lib/templates/training/module-1/image/hyla_arborea.jpg +0 -0
  392. data/lib/templates/training/module-1/video/small.ogv +0 -0
  393. data/lib/templates/training/{development → module-2}/article.adoc +7 -2
  394. data/lib/templates/training/module-2/audio/ocean_waves.mp3 +0 -0
  395. data/lib/templates/training/module-2/image/hyla_arborea.jpg +0 -0
  396. data/lib/templates/training/module-2/video/small.ogv +0 -0
  397. data/lib/templates/training/readme.adoc +10 -1
  398. data/scenario.adoc +113 -20
  399. data/test/reports/test-1.0.x-11-12-2013.txt +123 -0
  400. data/todo.adoc +39 -0
  401. metadata +473 -51
  402. data/lib/hyla/training.rb +0 -25
  403. data/lib/templates/sample/asciidoc_source_highlight.adoc +0 -37
  404. data/lib/templates/training-exercises/Gemfile +0 -4
@@ -0,0 +1,129 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+
7
+ <title>reveal.js - Markdown Demo</title>
8
+
9
+ <link rel="stylesheet" href="../../css/reveal.css">
10
+ <link rel="stylesheet" href="../../css/theme/default.css" id="theme">
11
+
12
+ <link rel="stylesheet" href="../../lib/css/zenburn.css">
13
+ </head>
14
+
15
+ <body>
16
+
17
+ <div class="reveal">
18
+
19
+ <div class="slides">
20
+
21
+ <!-- Use external markdown resource, separate slides by three newlines; vertical slides by two newlines -->
22
+ <section data-markdown="example.md" data-separator="^\n\n\n" data-vertical="^\n\n"></section>
23
+
24
+ <!-- Slides are separated by three dashes (quick 'n dirty regular expression) -->
25
+ <section data-markdown data-separator="---">
26
+ <script type="text/template">
27
+ ## Demo 1
28
+ Slide 1
29
+ ---
30
+ ## Demo 1
31
+ Slide 2
32
+ ---
33
+ ## Demo 1
34
+ Slide 3
35
+ </script>
36
+ </section>
37
+
38
+ <!-- Slides are separated by newline + three dashes + newline, vertical slides identical but two dashes -->
39
+ <section data-markdown data-separator="^\n---\n$" data-vertical="^\n--\n$">
40
+ <script type="text/template">
41
+ ## Demo 2
42
+ Slide 1.1
43
+
44
+ --
45
+
46
+ ## Demo 2
47
+ Slide 1.2
48
+
49
+ ---
50
+
51
+ ## Demo 2
52
+ Slide 2
53
+ </script>
54
+ </section>
55
+
56
+ <!-- No "extra" slides, since there are no separators defined (so they'll become horizontal rulers) -->
57
+ <section data-markdown>
58
+ <script type="text/template">
59
+ A
60
+
61
+ ---
62
+
63
+ B
64
+
65
+ ---
66
+
67
+ C
68
+ </script>
69
+ </section>
70
+
71
+ <!-- Slide attributes -->
72
+ <section data-markdown>
73
+ <script type="text/template">
74
+ <!-- .slide: data-background="#000000" -->
75
+ ## Slide attributes
76
+ </script>
77
+ </section>
78
+
79
+ <!-- Element attributes -->
80
+ <section data-markdown>
81
+ <script type="text/template">
82
+ ## Element attributes
83
+ - Item 1 <!-- .element: class="fragment" data-fragment-index="2" -->
84
+ - Item 2 <!-- .element: class="fragment" data-fragment-index="1" -->
85
+ </script>
86
+ </section>
87
+
88
+ <!-- Code -->
89
+ <section data-markdown>
90
+ <script type="text/template">
91
+ ```php
92
+ public function foo()
93
+ {
94
+ $foo = array(
95
+ 'bar' => 'bar'
96
+ )
97
+ }
98
+ ```
99
+ </script>
100
+ </section>
101
+
102
+ </div>
103
+ </div>
104
+
105
+ <script src="../../lib/js/head.min.js"></script>
106
+ <script src="../../js/reveal.js"></script>
107
+
108
+ <script>
109
+
110
+ Reveal.initialize({
111
+ controls: true,
112
+ progress: true,
113
+ history: true,
114
+ center: true,
115
+
116
+ // Optional libraries used to extend on reveal.js
117
+ dependencies: [
118
+ { src: '../../lib/js/classList.js', condition: function() { return !document.body.classList; } },
119
+ { src: 'marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
120
+ { src: 'markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
121
+ { src: '../highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
122
+ { src: '../notes/notes.js' }
123
+ ]
124
+ });
125
+
126
+ </script>
127
+
128
+ </body>
129
+ </html>
@@ -0,0 +1,31 @@
1
+ # Markdown Demo
2
+
3
+
4
+
5
+ ## External 1.1
6
+
7
+ Content 1.1
8
+
9
+ Note: This will only appear in the speaker notes window.
10
+
11
+
12
+ ## External 1.2
13
+
14
+ Content 1.2
15
+
16
+
17
+
18
+ ## External 2
19
+
20
+ Content 2.1
21
+
22
+
23
+
24
+ ## External 3.1
25
+
26
+ Content 3.1
27
+
28
+
29
+ ## External 3.2
30
+
31
+ Content 3.2
@@ -0,0 +1,392 @@
1
+ /**
2
+ * The reveal.js markdown plugin. Handles parsing of
3
+ * markdown inside of presentations as well as loading
4
+ * of external markdown documents.
5
+ */
6
+ (function( root, factory ) {
7
+ if( typeof exports === 'object' ) {
8
+ module.exports = factory( require( './marked' ) );
9
+ }
10
+ else {
11
+ // Browser globals (root is window)
12
+ root.RevealMarkdown = factory( root.marked );
13
+ root.RevealMarkdown.initialize();
14
+ }
15
+ }( this, function( marked ) {
16
+
17
+ if( typeof marked === 'undefined' ) {
18
+ throw 'The reveal.js Markdown plugin requires marked to be loaded';
19
+ }
20
+
21
+ if( typeof hljs !== 'undefined' ) {
22
+ marked.setOptions({
23
+ highlight: function( lang, code ) {
24
+ return hljs.highlightAuto( lang, code ).value;
25
+ }
26
+ });
27
+ }
28
+
29
+ var DEFAULT_SLIDE_SEPARATOR = '^\n---\n$',
30
+ DEFAULT_NOTES_SEPARATOR = 'note:',
31
+ DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR = '\\\.element\\\s*?(.+?)$',
32
+ DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR = '\\\.slide:\\\s*?(\\\S.+?)$';
33
+
34
+
35
+ /**
36
+ * Retrieves the markdown contents of a slide section
37
+ * element. Normalizes leading tabs/whitespace.
38
+ */
39
+ function getMarkdownFromSlide( section ) {
40
+
41
+ var template = section.querySelector( 'script' );
42
+
43
+ // strip leading whitespace so it isn't evaluated as code
44
+ var text = ( template || section ).textContent;
45
+
46
+ var leadingWs = text.match( /^\n?(\s*)/ )[1].length,
47
+ leadingTabs = text.match( /^\n?(\t*)/ )[1].length;
48
+
49
+ if( leadingTabs > 0 ) {
50
+ text = text.replace( new RegExp('\\n?\\t{' + leadingTabs + '}','g'), '\n' );
51
+ }
52
+ else if( leadingWs > 1 ) {
53
+ text = text.replace( new RegExp('\\n? {' + leadingWs + '}','g'), '\n' );
54
+ }
55
+
56
+ return text;
57
+
58
+ }
59
+
60
+ /**
61
+ * Given a markdown slide section element, this will
62
+ * return all arguments that aren't related to markdown
63
+ * parsing. Used to forward any other user-defined arguments
64
+ * to the output markdown slide.
65
+ */
66
+ function getForwardedAttributes( section ) {
67
+
68
+ var attributes = section.attributes;
69
+ var result = [];
70
+
71
+ for( var i = 0, len = attributes.length; i < len; i++ ) {
72
+ var name = attributes[i].name,
73
+ value = attributes[i].value;
74
+
75
+ // disregard attributes that are used for markdown loading/parsing
76
+ if( /data\-(markdown|separator|vertical|notes)/gi.test( name ) ) continue;
77
+
78
+ if( value ) {
79
+ result.push( name + '=' + value );
80
+ }
81
+ else {
82
+ result.push( name );
83
+ }
84
+ }
85
+
86
+ return result.join( ' ' );
87
+
88
+ }
89
+
90
+ /**
91
+ * Inspects the given options and fills out default
92
+ * values for what's not defined.
93
+ */
94
+ function getSlidifyOptions( options ) {
95
+
96
+ options = options || {};
97
+ options.separator = options.separator || DEFAULT_SLIDE_SEPARATOR;
98
+ options.notesSeparator = options.notesSeparator || DEFAULT_NOTES_SEPARATOR;
99
+ options.attributes = options.attributes || '';
100
+
101
+ return options;
102
+
103
+ }
104
+
105
+ /**
106
+ * Helper function for constructing a markdown slide.
107
+ */
108
+ function createMarkdownSlide( content, options ) {
109
+
110
+ options = getSlidifyOptions( options );
111
+
112
+ var notesMatch = content.split( new RegExp( options.notesSeparator, 'mgi' ) );
113
+
114
+ if( notesMatch.length === 2 ) {
115
+ content = notesMatch[0] + '<aside class="notes" data-markdown>' + notesMatch[1].trim() + '</aside>';
116
+ }
117
+
118
+ return '<script type="text/template">' + content + '</script>';
119
+
120
+ }
121
+
122
+ /**
123
+ * Parses a data string into multiple slides based
124
+ * on the passed in separator arguments.
125
+ */
126
+ function slidify( markdown, options ) {
127
+
128
+ options = getSlidifyOptions( options );
129
+
130
+ var separatorRegex = new RegExp( options.separator + ( options.verticalSeparator ? '|' + options.verticalSeparator : '' ), 'mg' ),
131
+ horizontalSeparatorRegex = new RegExp( options.separator );
132
+
133
+ var matches,
134
+ lastIndex = 0,
135
+ isHorizontal,
136
+ wasHorizontal = true,
137
+ content,
138
+ sectionStack = [];
139
+
140
+ // iterate until all blocks between separators are stacked up
141
+ while( matches = separatorRegex.exec( markdown ) ) {
142
+ notes = null;
143
+
144
+ // determine direction (horizontal by default)
145
+ isHorizontal = horizontalSeparatorRegex.test( matches[0] );
146
+
147
+ if( !isHorizontal && wasHorizontal ) {
148
+ // create vertical stack
149
+ sectionStack.push( [] );
150
+ }
151
+
152
+ // pluck slide content from markdown input
153
+ content = markdown.substring( lastIndex, matches.index );
154
+
155
+ if( isHorizontal && wasHorizontal ) {
156
+ // add to horizontal stack
157
+ sectionStack.push( content );
158
+ }
159
+ else {
160
+ // add to vertical stack
161
+ sectionStack[sectionStack.length-1].push( content );
162
+ }
163
+
164
+ lastIndex = separatorRegex.lastIndex;
165
+ wasHorizontal = isHorizontal;
166
+ }
167
+
168
+ // add the remaining slide
169
+ ( wasHorizontal ? sectionStack : sectionStack[sectionStack.length-1] ).push( markdown.substring( lastIndex ) );
170
+
171
+ var markdownSections = '';
172
+
173
+ // flatten the hierarchical stack, and insert <section data-markdown> tags
174
+ for( var i = 0, len = sectionStack.length; i < len; i++ ) {
175
+ // vertical
176
+ if( sectionStack[i] instanceof Array ) {
177
+ markdownSections += '<section '+ options.attributes +'>';
178
+
179
+ sectionStack[i].forEach( function( child ) {
180
+ markdownSections += '<section data-markdown>' + createMarkdownSlide( child, options ) + '</section>';
181
+ } );
182
+
183
+ markdownSections += '</section>';
184
+ }
185
+ else {
186
+ markdownSections += '<section '+ options.attributes +' data-markdown>' + createMarkdownSlide( sectionStack[i], options ) + '</section>';
187
+ }
188
+ }
189
+
190
+ return markdownSections;
191
+
192
+ }
193
+
194
+ /**
195
+ * Parses any current data-markdown slides, splits
196
+ * multi-slide markdown into separate sections and
197
+ * handles loading of external markdown.
198
+ */
199
+ function processSlides() {
200
+
201
+ var sections = document.querySelectorAll( '[data-markdown]'),
202
+ section;
203
+
204
+ for( var i = 0, len = sections.length; i < len; i++ ) {
205
+
206
+ section = sections[i];
207
+
208
+ if( section.getAttribute( 'data-markdown' ).length ) {
209
+
210
+ var xhr = new XMLHttpRequest(),
211
+ url = section.getAttribute( 'data-markdown' );
212
+
213
+ datacharset = section.getAttribute( 'data-charset' );
214
+
215
+ // see https://developer.mozilla.org/en-US/docs/Web/API/element.getAttribute#Notes
216
+ if( datacharset != null && datacharset != '' ) {
217
+ xhr.overrideMimeType( 'text/html; charset=' + datacharset );
218
+ }
219
+
220
+ xhr.onreadystatechange = function() {
221
+ if( xhr.readyState === 4 ) {
222
+ if ( xhr.status >= 200 && xhr.status < 300 ) {
223
+
224
+ section.outerHTML = slidify( xhr.responseText, {
225
+ separator: section.getAttribute( 'data-separator' ),
226
+ verticalSeparator: section.getAttribute( 'data-vertical' ),
227
+ notesSeparator: section.getAttribute( 'data-notes' ),
228
+ attributes: getForwardedAttributes( section )
229
+ });
230
+
231
+ }
232
+ else {
233
+
234
+ section.outerHTML = '<section data-state="alert">' +
235
+ 'ERROR: The attempt to fetch ' + url + ' failed with HTTP status ' + xhr.status + '.' +
236
+ 'Check your browser\'s JavaScript console for more details.' +
237
+ '<p>Remember that you need to serve the presentation HTML from a HTTP server.</p>' +
238
+ '</section>';
239
+
240
+ }
241
+ }
242
+ };
243
+
244
+ xhr.open( 'GET', url, false );
245
+
246
+ try {
247
+ xhr.send();
248
+ }
249
+ catch ( e ) {
250
+ alert( 'Failed to get the Markdown file ' + url + '. Make sure that the presentation and the file are served by a HTTP server and the file can be found there. ' + e );
251
+ }
252
+
253
+ }
254
+ else if( section.getAttribute( 'data-separator' ) || section.getAttribute( 'data-vertical' ) || section.getAttribute( 'data-notes' ) ) {
255
+
256
+ section.outerHTML = slidify( getMarkdownFromSlide( section ), {
257
+ separator: section.getAttribute( 'data-separator' ),
258
+ verticalSeparator: section.getAttribute( 'data-vertical' ),
259
+ notesSeparator: section.getAttribute( 'data-notes' ),
260
+ attributes: getForwardedAttributes( section )
261
+ });
262
+
263
+ }
264
+ else {
265
+ section.innerHTML = createMarkdownSlide( getMarkdownFromSlide( section ) );
266
+ }
267
+ }
268
+
269
+ }
270
+
271
+ /**
272
+ * Check if a node value has the attributes pattern.
273
+ * If yes, extract it and add that value as one or several attributes
274
+ * the the terget element.
275
+ *
276
+ * You need Cache Killer on Chrome to see the effect on any FOM transformation
277
+ * directly on refresh (F5)
278
+ * http://stackoverflow.com/questions/5690269/disabling-chrome-cache-for-website-development/7000899#answer-11786277
279
+ */
280
+ function addAttributeInElement( node, elementTarget, separator ) {
281
+
282
+ var mardownClassesInElementsRegex = new RegExp( separator, 'mg' );
283
+ var mardownClassRegex = new RegExp( "([^\"= ]+?)=\"([^\"=]+?)\"", 'mg' );
284
+ var nodeValue = node.nodeValue;
285
+ if( matches = mardownClassesInElementsRegex.exec( nodeValue ) ) {
286
+
287
+ var classes = matches[1];
288
+ nodeValue = nodeValue.substring( 0, matches.index ) + nodeValue.substring( mardownClassesInElementsRegex.lastIndex );
289
+ node.nodeValue = nodeValue;
290
+ while( matchesClass = mardownClassRegex.exec( classes ) ) {
291
+ elementTarget.setAttribute( matchesClass[1], matchesClass[2] );
292
+ }
293
+ return true;
294
+ }
295
+ return false;
296
+ }
297
+
298
+ /**
299
+ * Add attributes to the parent element of a text node,
300
+ * or the element of an attribute node.
301
+ */
302
+ function addAttributes( section, element, previousElement, separatorElementAttributes, separatorSectionAttributes ) {
303
+
304
+ if ( element != null && element.childNodes != undefined && element.childNodes.length > 0 ) {
305
+ previousParentElement = element;
306
+ for( var i = 0; i < element.childNodes.length; i++ ) {
307
+ childElement = element.childNodes[i];
308
+ if ( i > 0 ) {
309
+ j = i - 1;
310
+ while ( j >= 0 ) {
311
+ aPreviousChildElement = element.childNodes[j];
312
+ if ( typeof aPreviousChildElement.setAttribute == 'function' && aPreviousChildElement.tagName != "BR" ) {
313
+ previousParentElement = aPreviousChildElement;
314
+ break;
315
+ }
316
+ j = j - 1;
317
+ }
318
+ }
319
+ parentSection = section;
320
+ if( childElement.nodeName == "section" ) {
321
+ parentSection = childElement ;
322
+ previousParentElement = childElement ;
323
+ }
324
+ if ( typeof childElement.setAttribute == 'function' || childElement.nodeType == Node.COMMENT_NODE ) {
325
+ addAttributes( parentSection, childElement, previousParentElement, separatorElementAttributes, separatorSectionAttributes );
326
+ }
327
+ }
328
+ }
329
+
330
+ if ( element.nodeType == Node.COMMENT_NODE ) {
331
+ if ( addAttributeInElement( element, previousElement, separatorElementAttributes ) == false ) {
332
+ addAttributeInElement( element, section, separatorSectionAttributes );
333
+ }
334
+ }
335
+ }
336
+
337
+ /**
338
+ * Converts any current data-markdown slides in the
339
+ * DOM to HTML.
340
+ */
341
+ function convertSlides() {
342
+
343
+ var sections = document.querySelectorAll( '[data-markdown]');
344
+
345
+ for( var i = 0, len = sections.length; i < len; i++ ) {
346
+
347
+ var section = sections[i];
348
+
349
+ // Only parse the same slide once
350
+ if( !section.getAttribute( 'data-markdown-parsed' ) ) {
351
+
352
+ section.setAttribute( 'data-markdown-parsed', true )
353
+
354
+ var notes = section.querySelector( 'aside.notes' );
355
+ var markdown = getMarkdownFromSlide( section );
356
+
357
+ section.innerHTML = marked( markdown );
358
+ addAttributes( section, section, null, section.getAttribute( 'data-element-attributes' ) ||
359
+ section.parentNode.getAttribute( 'data-element-attributes' ) ||
360
+ DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR,
361
+ section.getAttribute( 'data-attributes' ) ||
362
+ section.parentNode.getAttribute( 'data-attributes' ) ||
363
+ DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR);
364
+
365
+ // If there were notes, we need to re-add them after
366
+ // having overwritten the section's HTML
367
+ if( notes ) {
368
+ section.appendChild( notes );
369
+ }
370
+
371
+ }
372
+
373
+ }
374
+
375
+ }
376
+
377
+ // API
378
+ return {
379
+
380
+ initialize: function() {
381
+ processSlides();
382
+ convertSlides();
383
+ },
384
+
385
+ // TODO: Do these belong in the API?
386
+ processSlides: processSlides,
387
+ convertSlides: convertSlides,
388
+ slidify: slidify
389
+
390
+ };
391
+
392
+ }));