octopress-code-highlighter 4.0.2 → 4.0.3

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: b62dcaff84deb8f301f43e12680d53541522a3fc
4
- data.tar.gz: 88633bb89d395de77c0b154faae96dfefa7c9bd8
3
+ metadata.gz: eaa7b8003229b9a5190ee54429c6600c56e8fd0f
4
+ data.tar.gz: 436f78a3eab962ad6a882d89104fc5f1888c7b44
5
5
  SHA512:
6
- metadata.gz: 3da4f670d94203531f90ae100f87d29dc5fdff3fadb617e82b30e46ff3d75c75be4e5167b56b1a9bee0cacd6fa7bd5bce306e397364f8a155406603f82a8f365
7
- data.tar.gz: 795fcf6d978184473cc5d5c17529891a49a44f63d0e5213feefdd8682925bd604fe8e448244ff65245f11413edfa1028e16ceda428e92ed2d7a454f5ee185987
6
+ metadata.gz: 26408b9788d16e3f593b375661fe9f6a17b0d3ce5a5f3fd2c7cdd5ae984f092e3dc21294281e99e5b73d85d09e131af5586ccafd82ce500beef2fd0182e67017
7
+ data.tar.gz: fe56c4a7449e23122297d5ab3a626af4516c4ac935239b7de78ca5f546118c920ffcc0386f4dcccbbaa9ef804af990dd6e963b4f3b0241d8c1d06cdbc997825e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.3 - 2014-06-26
4
+ - Fixed: Improved escaping characters for Liquid.
5
+
3
6
  ## 4.0.2
4
7
  - Fixed: end of range now works properly.
5
8
 
@@ -43,7 +43,7 @@ module Octopress
43
43
  cache
44
44
  else
45
45
  rendered_code = render
46
- rendered_code = encode_liquid(rendered_code)
46
+ rendered_code = escape_characters(rendered_code)
47
47
  rendered_code = tableize_code(rendered_code)
48
48
  rendered_code = "<figure class='code-highlight-figure'>#{caption}#{rendered_code}</figure>"
49
49
  rendered_code = "{% raw %}#{rendered_code}{% endraw %}" if options[:escape]
@@ -149,9 +149,8 @@ module Octopress
149
149
  code
150
150
  end
151
151
 
152
- def encode_liquid(code)
153
- code.gsub(/{{/, '&#x7b;&#x7b;')
154
- .gsub(/{%/, '&#x7b;&#x25;')
152
+ def escape_characters(code)
153
+ code.gsub(/{/, '&#x7b;').gsub(/}/, '&#x7d;')
155
154
  end
156
155
 
157
156
  private
@@ -1,6 +1,6 @@
1
1
  module Octopress
2
2
  module CodeHighlighter
3
- VERSION = "4.0.2"
3
+ VERSION = "4.0.3"
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-code-highlighter
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-23 00:00:00.000000000 Z
11
+ date: 2014-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorator