slimi 0.5.0 → 0.5.1

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
  SHA256:
3
- metadata.gz: 94ce8aacd3d29798f0831cedcd033b1706b2ccebe85264cff5321d8671d7fda3
4
- data.tar.gz: 5cbe5fe9791eafac5951f02853bb9600efb726f10d4a990d96b8ef5bfb2c4c38
3
+ metadata.gz: 36247783488eef0fc3711f969b37bc5b0cbc06b40086e7c524dfa4f46bba2823
4
+ data.tar.gz: 63e12ac1f2d178840b4d956b3c62195ce3601a3c212b1c48e5cc65ce7ca61a24
5
5
  SHA512:
6
- metadata.gz: ba6180bd2e6e890dd2149e19390a4cb030c85ddbaac97f89d259fc9cd476673ea62cc788f84654561642ec6e86055ac5c0ae0cd8d3f4eb86a7225ca200b82d30
7
- data.tar.gz: 537418a830f3b7d791e98ac107eea63732ede37d531c1d879eb9ded7588ab2a4897569fb05a552e73f543d6a4ce159fe9a66c0f0c2d6cd870e9976d58b6a46a2
6
+ metadata.gz: 549fc053c09c2283042f7bad2200d79d07e970d97c3aadacbd38e5fbbff54534bb0918b145580c23f1d4ffb2cba760167f09c6bc2b41de71c0b457c76c981f18
7
+ data.tar.gz: af6cc99ec67062a742f8bff4c76ac6da875a97a7afb5c6d193cd6c50b23e9e7e4ddd62b1ac690d3b94f6094ed5da1986cd2705b58a6147941788b13100ee77d2
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.5.1 - 2022-01-02
6
+
7
+ ### Changed
8
+
9
+ - Wrap slim attrvalue by slimi position expression.
10
+
5
11
  ## 0.5.0 - 2022-01-02
6
12
 
7
13
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- slimi (0.5.0)
4
+ slimi (0.5.1)
5
5
  temple
6
6
  tilt
7
7
 
data/README.md CHANGED
@@ -20,3 +20,40 @@ Just replace `gem 'slim'` with `gem 'slimi'` in your application's Gemfile.
20
20
  ```ruby
21
21
  gem 'slimi'
22
22
  ```
23
+
24
+ ## Compatibility
25
+
26
+ - Line indicators
27
+ - [x] Vebatim text
28
+ - [x] Inline HTML
29
+ - [x] Control
30
+ - [x] Output
31
+ - [x] HTML comment
32
+ - [x] Code comment
33
+ - [x] IE conditional comment
34
+ - Tags
35
+ - [x] Doctype declaration
36
+ - [x] Closed tags
37
+ - [x] Trailing and leading white space
38
+ - [x] Inline tags
39
+ - [x] Text content
40
+ - [x] Dynamic content
41
+ - [x] Tag shortcuts
42
+ - [ ] Dynamic tags
43
+ - Attributes
44
+ - [x] Attributes wrapper
45
+ - [x] Quoted attributes
46
+ - [x] Ruby attributes
47
+ - [x] Boolean attributes
48
+ - [x] Attribute merging
49
+ - [x] Attribute shortcuts
50
+ - [ ] Splat attributes
51
+ - Plugins
52
+ - [ ] Include partials
53
+ - [ ] Translator/I18n
54
+ - [ ] Logic-less mode
55
+ - [ ] Smart text mode
56
+ - Etc.
57
+ - [ ] CLI tools
58
+ - Slimi-only features
59
+ - [x] Embedded Ruby code location
data/lib/slimi/parser.rb CHANGED
@@ -269,9 +269,10 @@ module Slimi
269
269
  elsif @scanner.skip(@ruby_attribute_regexp)
270
270
  attribute_name = @scanner[1]
271
271
  escape = @scanner[2].empty?
272
+ charpos = @scanner.charpos
272
273
  attribute_value = parse_ruby_attribute_value(attribute_delimiter_closing)
273
274
  syntax_error!(Errors::InvalidEmptyAttributeError) if attribute_value.empty?
274
- attributes << [:html, :attr, attribute_name, [:slim, :attrvalue, escape, attribute_value]]
275
+ attributes << [:html, :attr, attribute_name, [:slimi, :position, charpos, charpos + attribute_value.length, [:slim, :attrvalue, escape, attribute_value]]]
275
276
  elsif !attribute_delimiter_closing_part_regexp
276
277
  break
277
278
  elsif @scanner.skip(boolean_attribute_regexp)
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.5.0'
4
+ VERSION = '0.5.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.5.0
4
+ version: 0.5.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: 2022-01-01 00:00:00.000000000 Z
11
+ date: 2022-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: temple