slimi 0.4.0 → 0.4.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
  SHA256:
3
- metadata.gz: 05cfa3a429ac2da0e1241e65e69a40f9171079cddb9451a6d7186726a5cb498c
4
- data.tar.gz: 68826c3fe78dc87bfd704cc38a9222da1adeed36a8c0d0e903bb4f3077ed698d
3
+ metadata.gz: 299f0ea50391c15aed1b99b4fb2cb1a8eae63a3ba97e2abc31cf676472a38cd8
4
+ data.tar.gz: 6119285d8a753ab001bf29eff8df574dfab52636fc092d324db50ec7d094e7eb
5
5
  SHA512:
6
- metadata.gz: 9c729933bc060a21df2e55db525d28a8e519526995ec5b7fb3defd17ecb11c71fc7e6ec664c162396f6a8be9175549dd842c7c5f9be76c68afadadc9e3e442be
7
- data.tar.gz: 60b3b1ad54a01bcbc2154e83b11efe3ac1b3fb5723773f04aabff9d1957dec60cb8afd431630b78dc8e13fa86d109d86a78c66005bafb10c23e0965368d9bd80
6
+ metadata.gz: 9269ec0c3c35efd6665a3f7aff882737479b72998b28cc067a80823885316a267958f3bf2a62107c7d56fd31bb12675f17b77053f7372c40fe768e3865775c13
7
+ data.tar.gz: 7c03ac659b980eb512c87c0fa8a3bc2b991faac079f71426e67a3ede722455677b3647d7ceb8af286aae3a38730b4e42c40ac07a62662c2db7d34339060a6055
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.4.1 - 2021-12-26
6
+
7
+ ### Fixed
8
+
9
+ - Fix bug on parsing Ruby attribute value.
10
+ - Fix bug on empty line in text block.
11
+
5
12
  ## 0.4.0 - 2021-12-25
6
13
 
7
14
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- slimi (0.4.0)
4
+ slimi (0.4.1)
5
5
  temple
6
6
 
7
7
  GEM
data/lib/slimi/parser.rb CHANGED
@@ -300,12 +300,12 @@ module Slimi
300
300
  attribute_value << @scanner[1] << "\n"
301
301
  else
302
302
  if count.positive?
303
- if opening_delimiter && @scanner.skip(::Regexp.escape(opening_delimiter))
303
+ if opening_delimiter && @scanner.match?(/#{::Regexp.escape(opening_delimiter)}/)
304
304
  count += 1
305
- elsif closing_delimiter && @scanner.skip(::Regexp.escape(closing_delimiter))
305
+ elsif closing_delimiter && @scanner.match?(/#{::Regexp.escape(closing_delimiter)}/)
306
306
  count -= 1
307
307
  end
308
- elsif @scanner.skip(@ruby_attribute_delimiter_regexp)
308
+ elsif @scanner.match?(@ruby_attribute_delimiter_regexp)
309
309
  count = 1
310
310
  opening_delimiter = @scanner.matched
311
311
  closing_delimiter = @ruby_attribute_delimiters[opening_delimiter]
@@ -503,9 +503,13 @@ module Slimi
503
503
  interpolate = parse_interpolate_line
504
504
  result << interpolate if interpolate
505
505
 
506
- loop do
507
- break unless @scanner.match?(/\r?\n[ \t]*/)
506
+ until @scanner.eos?
507
+ if @scanner.skip(/\r?\n[ \t]*(?=\r?\n)/)
508
+ result << [:newline]
509
+ next
510
+ end
508
511
 
512
+ @scanner.match?(/\r?\n[ \t]*/)
509
513
  indent = indent_from_last_match
510
514
  break if indent <= @indents.last
511
515
 
data/lib/slimi/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Slimi
4
- VERSION = '0.4.0'
4
+ VERSION = '0.4.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slimi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-24 00:00:00.000000000 Z
11
+ date: 2021-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: temple