asciidoctor-bibtex 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e39be76ce5e649e7075b470a56950f64c91ab7f084b902676356b6672012a9d1
4
- data.tar.gz: 467a9b62f3f9c51ec8778d41dd8a29bc3d2f06b7b5b88ff55f41b4fded73b66a
3
+ metadata.gz: 6d1f03803a062ef4e551b3b974200595dd61e1b79d5b1e55f476b4aa9191abdb
4
+ data.tar.gz: edcba2be0db713c30e82b155cb350e70fc3ffe64db6709d7ab3740251ccb8e37
5
5
  SHA512:
6
- metadata.gz: 983ff27cc0f7899411b3bba18f0afa0e54aa9aa4fa8ca82c48e4f61de3cbe4ea4a6e4c0dfc78539b54c8c2ae5ba3b7c5816bac88dc1550905f1356d1e163e69a
7
- data.tar.gz: a6bbc812e04a8f59a6f8499cf750bfc938fc73b5675d6b72d6f749f6c29e056dfc5bff83f0002180f9a076225c94972ef8b8f733d762f9c98595595bc67417e3
6
+ metadata.gz: 7ddbc0f7c25bc17f2bf25eb6e4711bbab5583a1e1ea472e911cacd04798a345c5bb6cf5a44bcf8504db65b4bb1efbf4a883c9f552d1fa40a9a94ea283c999c65
7
+ data.tar.gz: df997b1243e28c0f42e13083df3a6f57b7afadca8895d08268d4ede6ceba48ad34e1cd70b9948b247cda6e400aa61aa25c8b88d90f04a7b5d5937a6a0328de5e
@@ -70,6 +70,9 @@ module AsciidoctorBibtex
70
70
  bibtex_citation_template = ((document.attr 'bibtex-citation-template') || '[$id]').to_s
71
71
 
72
72
  # Fild bibtex file automatically if not supplied.
73
+ if bibtex_file.empty?
74
+ bibtex_file = AsciidoctorBibtex::PathUtils.find_bibfile document.base_dir
75
+ end
73
76
  if bibtex_file.empty?
74
77
  bibtex_file = AsciidoctorBibtex::PathUtils.find_bibfile '.'
75
78
  end
@@ -97,7 +100,10 @@ module AsciidoctorBibtex
97
100
  # First pass: extract all citations.
98
101
  prose_blocks.each do |block|
99
102
  if block.context == :list_item || block.context == :table_cell
100
- line = block.text
103
+ # NOTE: we access the instance variable @text for raw text.
104
+ # Otherwise the footnotes in the text will be pre-processed and
105
+ # ghost footnotes will be inserted (as of asciidoctor 2.0.10).
106
+ line = block.instance_variable_get(:@text)
101
107
  unless line.nil? || line.empty?
102
108
  processor.process_citation_macros line
103
109
  end
@@ -106,7 +112,7 @@ module AsciidoctorBibtex
106
112
  processor.process_citation_macros line
107
113
  end
108
114
  else
109
- line = block.title
115
+ line = block.instance_variable_get(:@title)
110
116
  processor.process_citation_macros line
111
117
  end
112
118
  end
@@ -133,7 +139,7 @@ module AsciidoctorBibtex
133
139
  # NOTE: we access the instance variable @text for raw text.
134
140
  line = block.instance_variable_get(:@title)
135
141
  line = processor.replace_citation_macros(line)
136
- # line = processor.replace_bibitem_macros(line)
142
+ line = processor.replace_bibitem_macros(line)
137
143
  block.title = line
138
144
  end
139
145
  end
@@ -1,3 +1,3 @@
1
1
  module AsciidoctorBibtex
2
- VERSION = '0.7.1'
2
+ VERSION = '0.8.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-bibtex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zhang YANG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-13 00:00:00.000000000 Z
11
+ date: 2020-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '4'
33
+ version: '5.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '4'
40
+ version: '5.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: citeproc-ruby
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -143,14 +143,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
143
  requirements:
144
144
  - - ">="
145
145
  - !ruby/object:Gem::Version
146
- version: 2.3.0
146
+ version: 2.4.0
147
147
  required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - ">="
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0'
152
152
  requirements: []
153
- rubygems_version: 3.0.6
153
+ rubygems_version: 3.1.2
154
154
  signing_key:
155
155
  specification_version: 4
156
156
  summary: An Asciidoctor extension that adds bibtex integration to AsciiDoc