Skip to content

Commit

Permalink
Merge branch 'release/2.6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
seboettg committed Dec 7, 2023
2 parents cae62a2 + a89b0c6 commit 32a86ca
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Rendering/Name/EtAl.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class EtAl implements Rendering
{
use FormattingTrait;

private $term;
private $term = 'et-al';

public function __construct(SimpleXMLElement $node)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Rendering/Name/Name.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private function getNamesString($name, $rank)
//contains nbsp prefixed by normal space or followed by normal space?
$text = htmlentities($text);
if (strpos($text, "  ") !== false || strpos($text, "  ") !== false) {
$text = preg_replace("/[\s]+/", "", $text); //remove normal spaces
$text = preg_replace("/\s+/", "", $text); //remove normal spaces
return preg_replace("/ +/", " ", $text);
}
$text = html_entity_decode(preg_replace("/[\s]+/", " ", $text));
Expand Down
13 changes: 13 additions & 0 deletions src/Root/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class Info
*/
private $links;

private $misc = [];

public function __construct(SimpleXMLElement $node)
{
$this->authors = [];
Expand Down Expand Up @@ -95,4 +97,15 @@ public function getLinks()
{
return $this->links;
}

public function __get(string $name)
{
return $this->misc[$name] ?? NULL;
}

public function __set(string $name, $value) : void
{
$this->misc[$name][] = $value;
}

}
2 changes: 1 addition & 1 deletion src/StyleSheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static function loadStyleSheet(string $styleName): string
public static function loadLocales(string $langKey): string
{
$localesPath = self::vendorPath()."/citation-style-language/locales";
$localeFile = "$localesPath/locales-${langKey}.xml";
$localeFile = "$localesPath/locales-{$langKey}.xml";
if (file_exists($localeFile)) {
return self::readFileContentsOrThrowException($localeFile);
} else {
Expand Down

0 comments on commit 32a86ca

Please sign in to comment.