rubypants-unicode 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4116600599d67f38ec6adc0e3fad5e3d1d384ebc
4
- data.tar.gz: 506e211a87944fe3a0a630946ed86cbfc412f461
3
+ metadata.gz: ec48527b8700c02e1f3ac369ef7556f671ad4096
4
+ data.tar.gz: 048ed99ea4e2cfcfae7a83c6eb7072ba508abcfb
5
5
  SHA512:
6
- metadata.gz: b3e36d228bc33887dd6ec7835c99a820fb59db420442b52c1cb6fa932933fcc0fccbd8a91d865a8521c6c97970995f1c272181cb4b209164d117d6ed3e346edb
7
- data.tar.gz: 957fd53c28e61ed65acc22fab96566689a6c55d8d0ad3a1a932f41cc45e991fe5c35e0219de7e2cbd161e2bd707243f33301a1d27d457fc4ae9c611fbf5fcc27
6
+ metadata.gz: a751af1c068cd70911270f0253463b929ac4748a42d1e3060855829993b383776f73a82fccfe8b593a80b58cb96469c54b2223a1baa205c65e8bf1bff92fabc9
7
+ data.tar.gz: 2f0a2329c360de3131072083da6b4eb71e2b79f10dd91cd6dd48edf13e44bf867be55818145f549b90c13fc072da805b7d7162f19880871765e33cf6afa21488
@@ -345,7 +345,7 @@ class RubyPants < String
345
345
  # em-dash HTML entity.
346
346
  #
347
347
  def educate_dashes(str)
348
- str.gsub(/--/, '—')
348
+ str.gsub(/--(?!>)/, '—')
349
349
  end
350
350
 
351
351
  # The string, with each instance of "<tt>--</tt>" translated to an
@@ -353,7 +353,7 @@ class RubyPants < String
353
353
  # em-dash HTML entity.
354
354
  #
355
355
  def educate_dashes_oldschool(str)
356
- str.gsub(/---/, '—').gsub(/--/, '–')
356
+ str.gsub(/---/, '—').gsub(/--(?!>)/, '–')
357
357
  end
358
358
 
359
359
  # Return the string, with each instance of "<tt>--</tt>" translated
@@ -367,7 +367,7 @@ class RubyPants < String
367
367
  # Aaron Swartz for the idea.)
368
368
  #
369
369
  def educate_dashes_inverted(str)
370
- str.gsub(/---/, '–').gsub(/--/, '—')
370
+ str.gsub(/---/, '–').gsub(/--(?!>)/, '—')
371
371
  end
372
372
 
373
373
  # Return the string, with each instance of "<tt>...</tt>" translated
@@ -1,3 +1,3 @@
1
1
  class RubyPants < String
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
@@ -158,4 +158,13 @@ EOF
158
158
  assert_rp_equal %q{foo\*bar}, "foo\\*bar"
159
159
  assert_rp_equal %q{foo\&bar}, "foo\\&bar"
160
160
  end
161
+
162
+ def test_html_comments
163
+
164
+ assert_rp_equal "-->", "-->"
165
+ assert_rp_equal "-->", "-->", [:oldschool]
166
+ assert_rp_equal "-->", "-->", [:inverted]
167
+
168
+ end
169
+
161
170
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubypants-unicode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Gruber
@@ -9,6 +9,7 @@ authors:
9
9
  - Christian Neukirchen
10
10
  - Jeremy McNevin
11
11
  - Chris Chapman
12
+ - Jared White
12
13
  autorequire:
13
14
  bindir: bin
14
15
  cert_chain: []