Browse Source

updated to work with Seboettg citeproc

8.x-1.x
Paul Pound 2 weeks ago
parent
commit
8bcdd075e0
  1. 9
      src/Plugin/BibCiteProcessor/CiteprocPhpInline.php

9
src/Plugin/BibCiteProcessor/CiteprocPhpInline.php

@ -2,7 +2,8 @@
namespace Drupal\bibcite_footnotes\Plugin\BibCiteProcessor;
use AcademicPuma\CiteProc\CiteProc;
//use AcademicPuma\CiteProc\CiteProc;
use Seboettg\CiteProc\CiteProc;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\bibcite\Plugin\BibCiteProcessorBase;
@ -66,8 +67,10 @@ class CiteprocPhpInline extends BibCiteProcessorBase implements BibCiteProcessor
if (!$data instanceof \stdClass) {
$data = json_decode(json_encode($data));
}
return $cite_proc->render($data, $mode);
if (!empty($data)) {
return $cite_proc->render($data, $mode);
}
return '';
}
}

Loading…
Cancel
Save