Commit 5c88e691 by rmrf

Fix: CI error

Add .to_i is there for positional insertions
parent 1d7fea3b
Pipeline #31433 passed with stages
in 42 seconds
......@@ -111,12 +111,12 @@ module Jekyll
# Is there a link for code
if entry.field?(:code)
code_url = "<div class=\"pure-button csl-code\"><a href=\"" + entry.code.to_s + "\">CODE</a></div>"
reference.insert(reference.rindex('</div>'), code_url.to_s )
reference.insert(reference.rindex('</div>').to_i, code_url.to_s )
end
# Generate the bibtex button
tex_bib = "<div class=\"pure-button csl-bibtex\"><a href=\"" + bibtex_link_for(entry).to_s + "\">BIBTEX</a></div>"
reference.insert(reference.rindex('</div>'), tex_bib.to_s )
reference.insert(reference.rindex('</div>').to_i, tex_bib.to_s )
content_tag config['bibliography_item_tag'], reference
content_tag "li class=\"" + render_ref_img(entry) + "\"", reference
......
......@@ -134,7 +134,7 @@ module Jekyll
# Is there a link for code
if entry.field?(:code)
code_url = "<div class=\"pure-button csl-code\"><a href=\"" + entry.code.to_s + "\">CODE</a></div>"
reference.insert(reference.rindex('</div>'), code_url.to_s )
reference.insert(reference.rindex('</div>').to_i, code_url.to_s )
end
......@@ -142,8 +142,7 @@ module Jekyll
# Generate the bibtex button for all pubs
tex_bib = "<div class=\"pure-button csl-bibtex\"><a href=\"" + bibtex_link_for(entry).to_s + "\">BIBTEX</a></div>"
puts reference.rindex('</div>')
reference.insert(reference.rindex('</div>'), tex_bib.to_s )
reference.insert(reference.rindex('</div>').to_i, tex_bib.to_s )
# Content tag is dependent on type of article.
content_tag "li class=\"" + render_ref_img(entry) + "\"", reference
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment