Skip to content

Commit

Permalink
Be more generous with URL expansion (#755)
Browse files Browse the repository at this point in the history
* Be more generous with URL expansion

* Update Template.php

* deal with non-journal urls

* Update Template.php

* Update Template.php

* Better url conversation

* Better handling of bare references

* Use blank() array option

* Update Template.php

* Check DOI is NOT active before marking inactive

* use template's doi

* blank does not support elements being arrays

* remove uneeded code
  • Loading branch information
GlazerMann authored and Martin R. Smith committed Sep 19, 2018
1 parent 27d4478 commit 4cac27f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function parse_text($text) {
// Re-assemble parsed template into string
public function parsed_text() {
if ($this->has(strtolower('CITATION_BOT_PLACEHOLDER_BARE_URL'))) {
if ($this->blank('title')) {
if ($this->blank(['title', 'chapter'])) {
return base64_decode($this->get(strtolower('CITATION_BOT_PLACEHOLDER_BARE_URL')));
} else {
report_action("Converted Bare reference to template: " . trim(base64_decode($this->get(strtolower('CITATION_BOT_PLACEHOLDER_BARE_URL')))));
Expand Down

0 comments on commit 4cac27f

Please sign in to comment.