Compare commits
2 Commits
1dcebd4fc5
...
bb37fc62bd
Author | SHA1 | Date | |
---|---|---|---|
bb37fc62bd | |||
89cf770472 |
@ -24,7 +24,7 @@ class TextFormatterLatexMathML extends Textformatter {
|
||||
'title' => 'LatexMathML Text Formatter',
|
||||
'version' => '0.9.1',
|
||||
'summary' => 'Replaces $latexformula$ with inline MathML',
|
||||
'author' = '7u83',
|
||||
'author' => '7u83',
|
||||
'autoload' => true,
|
||||
'singular' => true,
|
||||
'href' => 'https://git.planix.org/7u83/processwire-TextformatterLatexMathML',
|
||||
@ -65,6 +65,8 @@ class TextFormatterLatexMathML extends Textformatter {
|
||||
// unescape esaped $-signs
|
||||
$modifiedValue = str_replace('\$', '$',$modifiedValue);
|
||||
|
||||
$modifiedValue = str_replace('&','&',$modifiedValue);
|
||||
|
||||
// Save the node and its modified content for later replacement
|
||||
$nodesForReplacement[] = array(
|
||||
'node' => $node,
|
||||
@ -90,6 +92,7 @@ class TextFormatterLatexMathML extends Textformatter {
|
||||
// Define a callback function to convert the matched formula to MathML
|
||||
function convertToMathML($matches) {
|
||||
$cache = wire('cache');
|
||||
# $cache->deleteAll();
|
||||
|
||||
// $matches[1] contains the matched substring within '$'
|
||||
$formula = $matches[1];
|
||||
|
Loading…
Reference in New Issue
Block a user