reverse_markdown 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -41,9 +41,12 @@ Only basic html tags are supported right now. However, it should not be to diffi
41
41
 
42
42
  # See as well
43
43
 
44
- - [wmd-editor](http://wmd-editor.com)
45
- - [markdown syntax](http://daringfireball.net/projects/markdown)
44
+ - [wmd-editor](http://wmd-editor.com) - Markdown flavored text editor
45
+ - [markdown syntax](http://daringfireball.net/projects/markdown) - The markdown syntax specification
46
+ - [html_massage](https://rubygems.org/gems/html_massage) - A gem by Harlan T. Wood to convert regular sites into markdown
46
47
 
47
48
  # Thanks
48
49
 
49
50
  ..to Ben Woosley for his improvements to the first version.
51
+
52
+ ..to Harlan T. Wood for his help with the newer versions.
data/Rakefile CHANGED
@@ -3,3 +3,8 @@ require "bundler/gem_tasks"
3
3
  require 'rspec/core/rake_task'
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
  task :default => :spec
6
+
7
+ desc "Open an irb session preloaded with this library"
8
+ task :console do
9
+ sh "irb -rubygems -I lib -r reverse_markdown.rb"
10
+ end
@@ -166,7 +166,7 @@ module ReverseMarkdown
166
166
  end
167
167
  when :a
168
168
  if !element.text.strip.empty? && element['href'] && !element['href'].start_with?('#')
169
- "](#{element['href']}#{title_markdown(element)}) "
169
+ "](#{element['href']}#{title_markdown(element)})"
170
170
  else
171
171
  ""
172
172
  end
@@ -1,3 +1,3 @@
1
1
  module ReverseMarkdown
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -4,6 +4,7 @@
4
4
  <a href="http://foobar.com">Foobar</a>
5
5
  <a href="http://foobar.com" title="f***** up beyond all recognition">Fubar</a>
6
6
  <a href="http://strong.foobar.com"><strong>Strong foobar</strong></a>
7
+ Period after the anchor: there shouldn't be an extra space after the <a href="http://foobar.com">anchor</a>. But inline, <a href="http://foobar.com">there</a> should be a space.
7
8
 
8
9
  ignore <a href="foo.html"> </a> anchor tags with no link text
9
10
  pass through the text of <a href="#content">internal jumplinks</a> without treating them as links
@@ -13,6 +13,8 @@ describe ReverseMarkdown::Mapper do
13
13
  it { should include ' ![](http://foobar.com/logo.png) ' }
14
14
  it { should include ' ![foobar image](http://foobar.com/foobar.png) ' }
15
15
  it { should include ' ![foobar image 2](http://foobar.com/foobar2.png "this is the foobar image 2") ' }
16
+ it { should include 'extra space after the [anchor](http://foobar.com).'}
17
+ it { should include 'But inline, [there](http://foobar.com) should be a space.'}
16
18
 
17
19
  context "links to ignore" do
18
20
  it { should include ' ignore anchor tags with no link text ' }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reverse_markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-25 00:00:00.000000000 Z
12
+ date: 2012-12-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -148,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
148
  version: '0'
149
149
  segments:
150
150
  - 0
151
- hash: -1957963003780104262
151
+ hash: 2880516726110025982
152
152
  required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  none: false
154
154
  requirements:
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  version: '0'
158
158
  segments:
159
159
  - 0
160
- hash: -1957963003780104262
160
+ hash: 2880516726110025982
161
161
  requirements: []
162
162
  rubyforge_project: reverse_markdown
163
163
  rubygems_version: 1.8.24