markdown_ruby_documentation 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89c92e0b3d12b3f80da67905864c6f5b7a31cd79
4
- data.tar.gz: 15c908a0de16d99f4baf8b03d4f66f58416bb242
3
+ metadata.gz: 15e167a900d4c28baebc495ae718ef953066fded
4
+ data.tar.gz: 2a58da6261d05fa314ae8c15aae13a48a8a11dc9
5
5
  SHA512:
6
- metadata.gz: 5bc675cf2689ed27296c5c22fa8224590a1ae71beee02ae189461985a57d6a353ee52b50b211bd72747cc5a88803633141bebf67c3bf7cc0f6f31b3901e36718
7
- data.tar.gz: 8de69ad32561270e855092dbf111066c9c7de1deffad0f548b642d43ba59d494ad885b84b4e3238c8c2521d6697f42feb0bc5707fa84587bc007d956eb6e47c4
6
+ metadata.gz: ad5cdf4188306b2ce4278a1b2187ef10a54824313f1b7b8561af40f6ff80a07cfb1b72d2864e53af1f2d66c924374138c5a39b96039a4b1e703515539883a0bf
7
+ data.tar.gz: 102769a3ebc9bd1b12ff7e2d0fba43cb290a0b7bf3afd9c8b3fba97f6beb80e4dd1d20fa9e7546ee1ed21ba196410ae52c3900fd0cba9234f557174659c40d54
@@ -34,7 +34,7 @@ module MarkdownRubyDocumentation
34
34
  end
35
35
 
36
36
  def md_id(str)
37
- str.downcase.dasherize.delete(" ").delete('?')
37
+ str.downcase.dasherize.delete(" ").delete('?').delete('!')
38
38
  end
39
39
  end
40
40
  end
@@ -13,8 +13,9 @@ module MarkdownRubyDocumentation
13
13
  end
14
14
 
15
15
  def generate
16
- text.scan(/\[.*\]\((.*)\)/).each do |r|
16
+ text.scan(/\[[\w?\-_!0-9 ]*\]\((.*?)\)/).each do |r|
17
17
  link = r.first
18
+
18
19
  if link.include?(path.to_s)
19
20
  @text = text.gsub(link, create_relative_link(link))
20
21
  end
@@ -232,7 +232,7 @@ module MarkdownRubyDocumentation
232
232
  # #=> "[MyLink](#path/to/it#method-name)"
233
233
  def format_link(title, link_ref)
234
234
  path, anchor = *link_ref.to_s.split("#")
235
- formatted_path = [path, anchor.try!(:dasherize).try!(:delete, "?")].compact.join("#")
235
+ formatted_path = [path, anchor.try!(:dasherize).try!(:delete, "?").try(:delete, "!")].compact.join("#")
236
236
  "[#{title}](#{formatted_path})"
237
237
  end
238
238
 
@@ -318,7 +318,7 @@ module MarkdownRubyDocumentation
318
318
  end
319
319
  end
320
320
  rescue UnimplementedMethod => e
321
- "[#{title}](##{match.downcase.dasherize.delete(" ").delete('?')})"
321
+ "[#{title}](##{match.downcase.dasherize.delete(" ").delete('?').delete("!")})"
322
322
  end
323
323
 
324
324
  private
@@ -1,3 +1,3 @@
1
1
  module MarkdownRubyDocumentation
2
- VERSION = "0.9.0"
2
+ VERSION = "0.10.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown_ruby_documentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Zeisler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-22 00:00:00.000000000 Z
11
+ date: 2016-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: method_source