slimi 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/README.md +37 -0
- data/lib/slimi/parser.rb +2 -1
- data/lib/slimi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36247783488eef0fc3711f969b37bc5b0cbc06b40086e7c524dfa4f46bba2823
|
4
|
+
data.tar.gz: 63e12ac1f2d178840b4d956b3c62195ce3601a3c212b1c48e5cc65ce7ca61a24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 549fc053c09c2283042f7bad2200d79d07e970d97c3aadacbd38e5fbbff54534bb0918b145580c23f1d4ffb2cba760167f09c6bc2b41de71c0b457c76c981f18
|
7
|
+
data.tar.gz: af6cc99ec67062a742f8bff4c76ac6da875a97a7afb5c6d193cd6c50b23e9e7e4ddd62b1ac690d3b94f6094ed5da1986cd2705b58a6147941788b13100ee77d2
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
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
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.
|
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-
|
11
|
+
date: 2022-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: temple
|