forked from friendica/php-json-ld
Fix whitespace regex.
This commit is contained in:
parent
18e2934981
commit
080dec516e
18
jsonld.php
18
jsonld.php
|
@ -1563,14 +1563,6 @@ class JsonLdProcessor {
|
|||
*/
|
||||
protected function _toRDF(
|
||||
$element, $namer, $subject, $property, $graph, &$statements) {
|
||||
// recurse into arrays
|
||||
if(is_array($element)) {
|
||||
foreach($element as $e) {
|
||||
$this->_toRDF($e, $namer, $subject, $property, $graph, $statements);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(is_object($element)) {
|
||||
// convert @value to object
|
||||
if(self::_isValue($element)) {
|
||||
|
@ -1671,6 +1663,14 @@ class JsonLdProcessor {
|
|||
return;
|
||||
}
|
||||
|
||||
if(is_array($element)) {
|
||||
// recurse into arrays
|
||||
foreach($element as $e) {
|
||||
$this->_toRDF($e, $namer, $subject, $property, $graph, $statements);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(is_string($element)) {
|
||||
// property can be null for string subject references in @graph
|
||||
if($property === null) {
|
||||
|
@ -3725,7 +3725,7 @@ class JsonLdProcessor {
|
|||
$datatype = "(?:\\^\\^$iri)";
|
||||
$language = '(?:@([a-z]+(?:-[a-z0-9]+)*))';
|
||||
$literal = "(?:$plain(?:$datatype|$language)?)";
|
||||
$ws = '[ \t]';
|
||||
$ws = '[ \\t]';
|
||||
$eoln = '/(?:\r\n)|(?:\n)|(?:\r)/';
|
||||
$empty = "/^$ws*$/";
|
||||
|
||||
|
|
Loading…
Reference in a new issue