bibtex-ruby 3.1.5 → 3.1.6
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 +4 -4
- data/History.txt +6 -0
- data/lib/bibtex/entry.rb +3 -2
- data/lib/bibtex/lexer.rb +2 -2
- data/lib/bibtex/names.rb +1 -0
- data/lib/bibtex/value.rb +1 -1
- data/lib/bibtex/version.rb +1 -1
- data/test/bibtex/test_parser.rb +7 -0
- 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: 817e4bd6a66bba45eefcef6103c6ece1d8a1f9df
|
4
|
+
data.tar.gz: 9b69db7b3a997f2420fbb2d79be549289631b00e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2b0ebcfaa88d4394471204ad951255cab24b195eb55bf70cebdd55200fc5377c651b9573e734272b736478df5069818ed37f9e8682942ab5bd953b475e4e4f8
|
7
|
+
data.tar.gz: 93d6bfa04a79ff16ffdd818bdba9271b7afb1faea41c5963b0dc1a9fbabb141361738b393712c527ddbdde83e17599c25d71f2bd3e33d007e9172a4a7fd1a647
|
data/History.txt
CHANGED
data/lib/bibtex/entry.rb
CHANGED
@@ -309,9 +309,10 @@ module BibTeX
|
|
309
309
|
end
|
310
310
|
end
|
311
311
|
|
312
|
-
def respond_to?(method)
|
312
|
+
def respond_to?(method, include_all=false)
|
313
313
|
provides?(method.to_sym) || method.to_s.match(/=$/) ||
|
314
|
-
method =~ /^(?:convert|from)_([a-z]+)(!)?$/ ||
|
314
|
+
method =~ /^(?:convert|from)_([a-z]+)(!)?$/ ||
|
315
|
+
(has_parent? && parent.respond_to?(method, include_all)) || super
|
315
316
|
end
|
316
317
|
|
317
318
|
# Returns a copy of the Entry with all the field names renamed.
|
data/lib/bibtex/lexer.rb
CHANGED
@@ -59,8 +59,8 @@ 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:] \/:_
|
62
|
+
:key => /\s*[[:alpha:][:digit:] \/:_!$\?\.%+;&\*-]+,/io,
|
63
|
+
:optional_key => /\s*[[:alpha:][:digit:] \/:_!$\?\.%+;&\*-]*,/io
|
64
64
|
}.freeze
|
65
65
|
|
66
66
|
MODE = Hash.new(:meta).merge({
|
data/lib/bibtex/names.rb
CHANGED
data/lib/bibtex/value.rb
CHANGED
data/lib/bibtex/version.rb
CHANGED
data/test/bibtex/test_parser.rb
CHANGED
@@ -55,6 +55,13 @@ module BibTeX
|
|
55
55
|
assert bib[:"foo+bar"]
|
56
56
|
end
|
57
57
|
|
58
|
+
it 'allows semicolons in keys' do
|
59
|
+
input = "@Misc{Gomez;,title = {Foobar}}"
|
60
|
+
bib = Parser.new(:debug => false, :strict => false).parse(input)
|
61
|
+
assert_equal "Gomez;", bib.first.key
|
62
|
+
assert bib[:"Gomez;"]
|
63
|
+
end
|
64
|
+
|
58
65
|
it 'fails when there is no cite-key' do
|
59
66
|
input = "@misc{title = {Crime and Punishment}}"
|
60
67
|
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: 3.1.
|
4
|
+
version: 3.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvester Keil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: latex-decode
|