asciidoctor-bibtex 0.5.1 → 0.5.2

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: ac01b9ec559cc2ceb51cda2b1b116dbc7db1b32d2d04bb39f6e4592aaa90deea
4
- data.tar.gz: 190ddbfcf32d305475a538b654fb9964a7761b1e1d94919fbc9cbed1b8f12533
3
+ metadata.gz: 961c0ec9cfd281aab9ea43e5191ff9ad845849fd851a61625329c0676099f246
4
+ data.tar.gz: c968cd134fcf4696af048c5c30c2316b93e7fcde050b6230581063e9ccdd44d5
5
5
  SHA512:
6
- metadata.gz: d5d29adf45174f56641d52773969dc27619f5a4679c8b861f44f9bb211308c9823f5ca7e47f84f9a9bfeb33dd65afb40d8f3cdb24f83e7b16eb989a1d095a014
7
- data.tar.gz: 4fe54155a299c08cc13dda1c308c5929f568fbd5120b601f8cd12824068954b7786b9cbe2ec69c8ac2a11956af3a016e9f529f4bb762e9d54e5eb1e4f8c6291f
6
+ metadata.gz: de2d39bd265c5e4f114d41cd3d9b2d0a8ea6f70ef416a2a631ee316a1005ae397ecc0e0d0bac57a17193a2e69654d88469e3b1cb10c1e679ae943998ae42fc86
7
+ data.tar.gz: b57e19aa3ca7365e1f1e6f5f94dcfc9cabc53247212f4be0fe40e22708733ab320c02676170509562c4a77914d88dd9038be50a0eea4cb6c62b66ff15db88bfd
@@ -109,9 +109,13 @@ module AsciidoctorBibtex
109
109
  # Second pass: replace citations with citation texts.
110
110
  prose_blocks.each do |block|
111
111
  if block.context == :list_item || block.context == :table_cell
112
- line = block.text
113
- line = processor.replace_citation_macros(line)
114
- block.text = line
112
+ # NOTE: we access the instance variable @text directly to prevent
113
+ # asciidoctor from changing the raw texts.
114
+ line = block.instance_variable_get(:@text)
115
+ if !line.empty?
116
+ line = processor.replace_citation_macros(line)
117
+ block.instance_variable_set(:@text, line)
118
+ end
115
119
  else
116
120
  block.lines.each_with_index do |line, index|
117
121
  line = processor.replace_citation_macros(line)
@@ -1,3 +1,3 @@
1
1
  module AsciidoctorBibtex
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
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.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zhang YANG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-18 00:00:00.000000000 Z
11
+ date: 2019-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor