hamlit 2.9.4 → 2.9.5

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
  SHA256:
3
- metadata.gz: ff5c08623e133d33678ed09abfa8aeb752ff6fe48a203d6d22000430335e0ced
4
- data.tar.gz: caa9eb9872690fc5ae45432c5c8487be7fafe51f2e65f484e6f9602f5afdf4d2
3
+ metadata.gz: 818a7688a58be17941aea6ddd21986d58186048882d0672b9f8a586d19a00972
4
+ data.tar.gz: 22c7eaef6d2fb67fe939c8d861780d4d56affa6df0d478ede2b0beb7da6bf79f
5
5
  SHA512:
6
- metadata.gz: 0d1241f1a8d1fea6d4528649047d5830197b84e3c2bc01c17f8dd07d59f9cc02023b9c28140817f8aeee92ea26bd67ca3bbf864fa3ffeaff83f271d365b87a23
7
- data.tar.gz: 97fcaa8d8b03f6fc84c27927c9a1b73f871211b3d109b32258786a897d54ccb5f3b68c2e42c7e2175dda04073f1dc2aaecb3d3479df34806a5119b035b773968
6
+ metadata.gz: 56fa71f1352812b9f98e2042f4f59fb54cb35183ee3ee9c29fd9302293446522bbd5c03e0cd9859fb0d757ec854692e544a4a51e169bb9478da68b251f1059a2
7
+ data.tar.gz: 564b8282a5a1db7b476d664792d157112fbe5f4d28be48b0d31f89542c084fda0c17f86a2930306c3ed9b599b04e43073e81929488d49b0101a78ed2c336bceb
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. This
4
4
  project adheres to [Semantic Versioning](http://semver.org/). This change log is based upon
5
5
  [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog).
6
6
 
7
+ ## [2.9.5](https://github.com/k0kubun/hamlit/compare/v2.9.4...v2.9.5) - 2019-09-08
8
+
9
+ ### Added
10
+
11
+ - Supported `:plain` filter in truffleruby
12
+
7
13
  ## [2.9.4](https://github.com/k0kubun/hamlit/compare/v2.9.3...v2.9.4) - 2019-09-08
8
14
 
9
15
  ### Added
@@ -5,9 +5,6 @@ module Hamlit
5
5
  class Filters
6
6
  class Plain < Base
7
7
  def compile(node)
8
- unless Ripper.respond_to?(:lex)
9
- raise NotImplementedError.new('This platform does not have Ripper.lex required for :plain filter')
10
- end
11
8
  text = node.value[:text]
12
9
  text = text.rstrip unless ::Hamlit::HamlUtil.contains_interpolation?(text) # for compatibility
13
10
  [:multi, *compile_plain(text)]
@@ -17,6 +14,10 @@ module Hamlit
17
14
 
18
15
  def compile_plain(text)
19
16
  string_literal = ::Hamlit::HamlUtil.unescape_interpolation(text)
17
+ unless Ripper.respond_to?(:lex) # truffleruby doesn't have Ripper.lex
18
+ return [[:escape, false, [:dynamic, string_literal]]]
19
+ end
20
+
20
21
  StringSplitter.compile(string_literal).map do |temple|
21
22
  type, str = temple
22
23
  case type
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Hamlit
3
- VERSION = '2.9.4'
3
+ VERSION = '2.9.5'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hamlit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.4
4
+ version: 2.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun