nanaimo 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/Gemfile.lock +1 -1
- data/Rakefile +1 -0
- data/lib/nanaimo/reader.rb +9 -2
- data/lib/nanaimo/unicode/quote_maps.rb +1 -2
- data/lib/nanaimo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 090d05915f386fcbf6f5324805f7bd16f873678e
|
4
|
+
data.tar.gz: baa8d42469bd66dc1f7b0a6eae353698d6fe99e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2833cad61d387df8c5ac6e45118d109333484c0555a307ac566cd0d6bd50925ae5a5003191645e96d523f0d9d6e171aca7a7f3891a95f42f3119b516d77ac081
|
7
|
+
data.tar.gz: 7faf48d2d57caa6076f13f8d10c1b1dbac3895f7a54d2e217609574fa48316dde4f12a6e2f1054741e3982ad0a4489b0aaca5767165f53d848921663f8e3db21
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Nanaimo Changelog
|
2
2
|
|
3
|
+
## 0.2.2 (2016-11-04)
|
4
|
+
|
5
|
+
##### Enhancements
|
6
|
+
|
7
|
+
* None.
|
8
|
+
|
9
|
+
##### Bug Fixes
|
10
|
+
|
11
|
+
* Fix extraneously escaping single quotes when writing quoted strings.
|
12
|
+
[Samuel Giddins](https://github.com/segiddins)
|
13
|
+
|
14
|
+
* Properly align the `^` in parse error messages when the line with the syntax
|
15
|
+
error contains tabs.
|
16
|
+
[Samuel Giddins](https://github.com/segiddins)
|
17
|
+
|
18
|
+
|
3
19
|
## 0.2.1 (2016-11-03)
|
4
20
|
|
5
21
|
##### Enhancements
|
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
data/lib/nanaimo/reader.rb
CHANGED
@@ -47,12 +47,19 @@ module Nanaimo
|
|
47
47
|
indicator = "#{line_number.succ}> "
|
48
48
|
|
49
49
|
m = ::String.new("\n")
|
50
|
+
|
50
51
|
m << "#{indent}-------------------------------------------\n"
|
51
52
|
m << lines[[line_number - n, 0].max...line_number].map do |l|
|
52
53
|
"#{indent}#{l}\n"
|
53
54
|
end.join
|
54
|
-
|
55
|
-
|
55
|
+
|
56
|
+
line = lines[line_number].to_s
|
57
|
+
m << "#{indicator}#{line}\n"
|
58
|
+
|
59
|
+
m << ' ' * indent.size
|
60
|
+
m << line[0, column.pred].gsub(/[^\t]/, ' ')
|
61
|
+
m << "^\n"
|
62
|
+
|
56
63
|
m << Array(lines[line_number.succ..[lines.count.pred, line_number + n].min]).map do |l|
|
57
64
|
l.strip.empty? ? '' : "#{indent}#{l}\n"
|
58
65
|
end.join
|
@@ -9,7 +9,6 @@ module Nanaimo
|
|
9
9
|
"\t" => "\\t",
|
10
10
|
"\v" => "\\v",
|
11
11
|
"\n" => "\\n",
|
12
|
-
"'" => "\\'",
|
13
12
|
"\"" => "\\\"",
|
14
13
|
"\\" => "\\\\",
|
15
14
|
"\x00" => "\\U0000",
|
@@ -53,6 +52,6 @@ module Nanaimo
|
|
53
52
|
"\\" => "\\",
|
54
53
|
}.freeze
|
55
54
|
|
56
|
-
QUOTE_REGEXP = /\x07|\x08|\f|\r|\t|\v|\n|
|
55
|
+
QUOTE_REGEXP = /\x07|\x08|\f|\r|\t|\v|\n|"|\\|\x00|\x01|\x02|\x03|\x04|\x05|\x06|\x0E|\x0F|\x10|\x11|\x12|\x13|\x14|\x15|\x16|\x17|\x18|\x19|\x1A|\x1B|\x1C|\x1D|\x1E|\x1F/
|
57
56
|
end
|
58
57
|
end
|
data/lib/nanaimo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanaimo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danielle Tomlinson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-11-
|
12
|
+
date: 2016-11-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|