bibmarkdown 1.3.0 → 1.3.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 +4 -4
- data/VERSION +1 -1
- data/bibmarkdown.gemspec +3 -3
- data/lib/bibmarkdown/document.rb +13 -2
- 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: 53587cadd9fc941a280c4cdabf5b688f82f9ebf1
|
4
|
+
data.tar.gz: be7969509a4a8d40d68f175b20a5fb86a178a52a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e45159e0115fd021513ea45c10f3f159980adcb1e7bc234cb79969d61d864e2512f75e94767968861789a7cbe5bda3c97d287aaf91b724d7efa24302e03abb8
|
7
|
+
data.tar.gz: da0bba25f2b9b87a85e27e8e9850589f54383c15988b434ed2462232fc3146aaa4396ad7709cebb2271d1e67dfc56d44c4f83c114238fe25a1a924058f5bb80c
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.1
|
data/bibmarkdown.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: bibmarkdown 1.3.
|
5
|
+
# stub: bibmarkdown 1.3.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "bibmarkdown".freeze
|
9
|
-
s.version = "1.3.
|
9
|
+
s.version = "1.3.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Ruben Verborgh".freeze]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2018-02-23"
|
15
15
|
s.email = "ruben@verborgh.org".freeze
|
16
16
|
s.extra_rdoc_files = [
|
17
17
|
"LICENSE.md",
|
data/lib/bibmarkdown/document.rb
CHANGED
@@ -114,9 +114,20 @@ module BibMarkdown
|
|
114
114
|
end
|
115
115
|
|
116
116
|
def reference_html key
|
117
|
-
#
|
117
|
+
# Prepare reference HTML renderer
|
118
118
|
processor = CiteProc::Processor.new style: @style, format: 'html'
|
119
|
-
|
119
|
+
citeproc = @entries[key].to_citeproc
|
120
|
+
|
121
|
+
# Ensure multi-part last names stick together
|
122
|
+
(citeproc["author"] || citeproc["editor"]).each do |author|
|
123
|
+
if author.has_key? "non-dropping-particle"
|
124
|
+
author["family"] = "#{author["non-dropping-particle"]} #{author["family"]}"
|
125
|
+
author.delete "non-dropping-particle"
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
# Render reference
|
130
|
+
processor << citeproc
|
120
131
|
citations = processor.render :bibliography, id: key
|
121
132
|
citation = citations.first
|
122
133
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bibmarkdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ruben Verborgh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: citeproc-ruby
|