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(
|
protected function _toRDF(
|
||||||
$element, $namer, $subject, $property, $graph, &$statements) {
|
$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)) {
|
if(is_object($element)) {
|
||||||
// convert @value to object
|
// convert @value to object
|
||||||
if(self::_isValue($element)) {
|
if(self::_isValue($element)) {
|
||||||
|
@ -1671,6 +1663,14 @@ class JsonLdProcessor {
|
||||||
return;
|
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)) {
|
if(is_string($element)) {
|
||||||
// property can be null for string subject references in @graph
|
// property can be null for string subject references in @graph
|
||||||
if($property === null) {
|
if($property === null) {
|
||||||
|
@ -3725,7 +3725,7 @@ class JsonLdProcessor {
|
||||||
$datatype = "(?:\\^\\^$iri)";
|
$datatype = "(?:\\^\\^$iri)";
|
||||||
$language = '(?:@([a-z]+(?:-[a-z0-9]+)*))';
|
$language = '(?:@([a-z]+(?:-[a-z0-9]+)*))';
|
||||||
$literal = "(?:$plain(?:$datatype|$language)?)";
|
$literal = "(?:$plain(?:$datatype|$language)?)";
|
||||||
$ws = '[ \t]';
|
$ws = '[ \\t]';
|
||||||
$eoln = '/(?:\r\n)|(?:\n)|(?:\r)/';
|
$eoln = '/(?:\r\n)|(?:\n)|(?:\r)/';
|
||||||
$empty = "/^$ws*$/";
|
$empty = "/^$ws*$/";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue