redcarpet-abbreviations 0.1.0 → 0.1.1

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: 43216faec85094cfa38a56fe5d7cedb45afe74dc
4
- data.tar.gz: b17879213e5039b2ba9d345d5976f12b47aafe2d
3
+ metadata.gz: c4e2ea8cc6aed82c539ce615a5875e5186a9024d
4
+ data.tar.gz: 741eddb88f1cf6933fa501d4b98a09ae13eb17d6
5
5
  SHA512:
6
- metadata.gz: 087e65a44ec1b8439278e499cb3c4672d9d1aa6599fced44daa0f646095cb0247155b9d7d9a65b5a9cf6191408b8c95e801af0b8308dba0f4134dbe1d838aafd
7
- data.tar.gz: 9bde13e55e7a568e2870441eedac8d71fd5d7e1e566979b48985ac06e2ef2479305aaeda0a8747862de2b76783ec06fe27786117e598136368c2c0359cded373
6
+ metadata.gz: 3d34a98aa3f5dc16956126b02c8092a0738acf67beffb35a6bf2c6498d3370b5aed79bccb85203e012fa2506252f8a9b0851ec3a7e3c962a629e43e7fbe8a8c6
7
+ data.tar.gz: abfaaa697ef2f83bfcbdb7501c58e08852d4c94ca7d0322a6b7d372bcd566f0839724e2a4e305097faf7c308300522b54db9648f81808f463bcacae962246738
@@ -1,5 +1,5 @@
1
1
  module Redcarpet
2
2
  module Abbreviations
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -2,7 +2,7 @@ module Redcarpet
2
2
  module Render
3
3
  module HTMLAbbreviations
4
4
 
5
- REGEXP = /^\*\[([-A-Z]+)\]: (.+)$/
5
+ REGEXP = /^\*\[([-A-Z0-9]+)\]: (.+)$/
6
6
 
7
7
  def preprocess(document)
8
8
  abbreviations = document.scan(REGEXP)
@@ -34,6 +34,18 @@ describe Redcarpet::Render::HTMLAbbreviations do
34
34
  EOS
35
35
  end
36
36
 
37
+ it "converts abbrevations with numbers to HTML" do
38
+ markdown = <<-EOS.strip_heredoc
39
+ ES6
40
+
41
+ *[ES6]: ECMAScript 6
42
+ EOS
43
+
44
+ @renderer.new.preprocess(markdown).must_equal <<-EOS.strip_heredoc.chomp
45
+ <abbr title="ECMAScript 6">ES6</abbr>
46
+ EOS
47
+ end
48
+
37
49
  end
38
50
 
39
51
  describe "#acronym_regexp" do
@@ -58,6 +70,10 @@ describe Redcarpet::Render::HTMLAbbreviations do
58
70
  "YOLOFOOYOLO".wont_match @renderer.new.acronym_regexp("FOO")
59
71
  end
60
72
 
73
+ it "matches numbers" do
74
+ "ES6".must_match @renderer.new.acronym_regexp("ES6")
75
+ end
76
+
61
77
  end
62
78
 
63
79
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redcarpet-abbreviations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Weiss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-14 00:00:00.000000000 Z
11
+ date: 2015-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  version: '0'
77
77
  requirements: []
78
78
  rubyforge_project:
79
- rubygems_version: 2.4.2
79
+ rubygems_version: 2.4.8
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: An extension for Redcarpet that supports abbreviations.