govspeak 0.8.8 → 0.8.9

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -5,6 +5,7 @@ require 'bundler'
5
5
  Bundler::GemHelper.install_tasks
6
6
 
7
7
  task :default => [:test_units]
8
+ task :test => [:test_units]
8
9
 
9
10
  desc "Run basic tests"
10
11
  Rake::TestTask.new("test_units") { |t|
@@ -12,4 +13,4 @@ Rake::TestTask.new("test_units") { |t|
12
13
  t.pattern = 'test/*_test.rb'
13
14
  t.verbose = true
14
15
  t.warning = true
15
- }
16
+ }
data/lib/govspeak.rb CHANGED
@@ -70,6 +70,11 @@ module Govspeak
70
70
  body.reverse
71
71
  }
72
72
 
73
+ extension('highlight-answer') { |body|
74
+ %{\n\n<div class="highlight-answer">
75
+ #{Kramdown::Document.new(body.strip).to_html}</div>\n}
76
+ }
77
+
73
78
  extension('external', surrounded_by("x")) { |body|
74
79
  Kramdown::Document.new("#{body.strip}{:rel='external'}").to_html
75
80
  }
@@ -25,6 +25,11 @@ class GovspeakTest < Test::Unit::TestCase
25
25
  assert_equal "<p>this </p>\n\n<p><em>si</em></p>\n\n<p>markdown</p>\n", rendered
26
26
  end
27
27
 
28
+ test "highlight-answer block extension" do
29
+ rendered = Govspeak::Document.new("this \n{::highlight-answer}Lead in to *BIG TEXT*\n{:/highlight-answer}").to_html
30
+ assert_equal %Q{<p>this </p>\n\n<div class="highlight-answer">\n<p>Lead in to <em>BIG TEXT</em></p>\n</div>\n}, rendered
31
+ end
32
+
28
33
  test "extracts headers with text, level and generated id" do
29
34
  document = Govspeak::Document.new %{
30
35
  # Big title
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: govspeak
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.8.8
5
+ version: 0.8.9
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ben Griffiths
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2012-01-17 00:00:00 Z
14
+ date: 2012-01-30 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: kramdown
@@ -78,7 +78,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - ">="
80
80
  - !ruby/object:Gem::Version
81
- hash: -776524915
81
+ hash: 3606479942582695776
82
82
  segments:
83
83
  - 0
84
84
  version: "0"
@@ -87,14 +87,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - ">="
89
89
  - !ruby/object:Gem::Version
90
- hash: -776524915
90
+ hash: 3606479942582695776
91
91
  segments:
92
92
  - 0
93
93
  version: "0"
94
94
  requirements: []
95
95
 
96
96
  rubyforge_project:
97
- rubygems_version: 1.8.12
97
+ rubygems_version: 1.8.13
98
98
  signing_key:
99
99
  specification_version: 3
100
100
  summary: Markup language for single domain