bibtex-ruby 4.4.4 → 4.4.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bibtex-ruby might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/lib/bibtex/lexer.rb +4 -4
- data/lib/bibtex/version.rb +1 -1
- data/test/bibtex/test_parser.rb +7 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: aa69e15636014bd4d0af97226ad200c4377134523853728de122f44e9326ed30
|
4
|
+
data.tar.gz: a94a366f880d39c790b89c58b09335b01572b899c74131266c868e99b9bec273
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3309d70b0501aa0423a13a41f639fad0a34d509cc314510850ae2e40c7872c90e2dc0b0e3e489aedaec54c7891182746e73c5d4e79dacd7ae20d737f2cab2a24
|
7
|
+
data.tar.gz: 7720f86610923c1404aa943809b67c11846bc1b798e3604b0f02503b76a318867c47a000a67470916c13b6b8c4ff19012b24dbf235dfe4aabc80d6be4af4e3bf
|
data/lib/bibtex/lexer.rb
CHANGED
@@ -36,7 +36,7 @@ module BibTeX
|
|
36
36
|
:strict => true,
|
37
37
|
:allow_missing_keys => false,
|
38
38
|
:strip => true
|
39
|
-
}
|
39
|
+
}
|
40
40
|
|
41
41
|
# Patterns Cache (#37: MacRuby does not cache regular expressions)
|
42
42
|
@patterns = {
|
@@ -59,9 +59,9 @@ module BibTeX
|
|
59
59
|
:string => /string/io,
|
60
60
|
:comment => /comment\b/io,
|
61
61
|
:preamble => /preamble\b/io,
|
62
|
-
:key => /\s*[[:alpha:][:digit:] \/:_
|
63
|
-
:optional_key => /\s*[[:alpha:][:digit:] \/:_
|
64
|
-
}
|
62
|
+
:key => /\s*[[:alpha:][:digit:] \/:_!$\?\.%+;&\*'"-]+,/io,
|
63
|
+
:optional_key => /\s*[[:alpha:][:digit:] \/:_!$\?\.%+;&\*'"-]*,/io
|
64
|
+
}
|
65
65
|
|
66
66
|
MODE = Hash.new(:meta).merge({
|
67
67
|
:bibtex => :bibtex, :entry => :bibtex,
|
data/lib/bibtex/version.rb
CHANGED
data/test/bibtex/test_parser.rb
CHANGED
@@ -62,6 +62,13 @@ module BibTeX
|
|
62
62
|
assert bib[:"Gomez;"]
|
63
63
|
end
|
64
64
|
|
65
|
+
it 'allows quotes in keys' do
|
66
|
+
input = %|@Misc{Gomez'1",title = {Foobar}}|
|
67
|
+
bib = Parser.new(:debug => false, :strict => false).parse(input)
|
68
|
+
assert_equal %{Gomez'1"}, bib.first.key
|
69
|
+
assert bib[:"Gomez'1\""]
|
70
|
+
end
|
71
|
+
|
65
72
|
it 'fails when there is no cite-key' do
|
66
73
|
input = "@misc{title = {Crime and Punishment}}"
|
67
74
|
assert_raises ParseError do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bibtex-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.4.
|
4
|
+
version: 4.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvester Keil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: latex-decode
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
147
|
rubyforge_project:
|
148
|
-
rubygems_version: 2.
|
148
|
+
rubygems_version: 2.7.4
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: A BibTeX parser, converter and API for Ruby.
|
@@ -158,9 +158,9 @@ test_files:
|
|
158
158
|
- test/bibtex/test_lexer.rb
|
159
159
|
- test/bibtex/test_name_parser.rb
|
160
160
|
- test/bibtex/test_names.rb
|
161
|
-
- test/bibtex/test_parser.rb
|
162
161
|
- test/bibtex/test_string.rb
|
163
162
|
- test/bibtex/test_utilities.rb
|
164
163
|
- test/bibtex/test_value.rb
|
164
|
+
- test/bibtex/test_parser.rb
|
165
165
|
- test/test_bibtex.rb
|
166
166
|
- test/test_export.rb
|