框架本地无法运行,修复尝试

This commit is contained in:
wangjinlei
2026-06-04 13:33:13 +08:00
parent bbd690ca0f
commit 0ee7c38000
359 changed files with 2767 additions and 3114 deletions

View File

@@ -10,7 +10,6 @@ use PhpOffice\Math\Element;
use PhpOffice\Math\Exception\InvalidInputException;
use PhpOffice\Math\Exception\NotImplementedException;
use PhpOffice\Math\Math;
use PhpOffice\Math\Reader\Security\XmlScanner;
class MathML implements ReaderInterface
{
@@ -23,17 +22,8 @@ class MathML implements ReaderInterface
/** @var DOMXPath */
private $xpath;
/** @var XmlScanner */
private $xmlScanner;
public function __construct()
{
$this->xmlScanner = XmlScanner::getInstance();
}
public function read(string $content): ?Math
{
$content = $this->xmlScanner->scan($content);
$content = str_replace(
[
'⁢',
@@ -45,7 +35,7 @@ class MathML implements ReaderInterface
);
$this->dom = new DOMDocument();
$this->dom->loadXML($content);
$this->dom->loadXML($content, LIBXML_DTDLOAD);
$this->math = new Math();
$this->parseNode(null, $this->math);