Skip to content

Commit 2c0f2fb

Browse files
committed
Protect AsciiMath default backtick delimiters from Dokuwiki parsing, too.
1 parent 53d4d47 commit 2c0f2fb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

syntax/protecttex.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ public function connectTo($mode) {
7474
$this->Lexer->addEntryPattern('\\\\begin{' . $env . '}(?=.*?\\\\end{' . $env . '})',$mode,'plugin_mathjax_protecttex');
7575
}
7676

77+
// Protect the default AsciiMath delimiter
78+
$this->Lexer->addEntryPattern('`(?=.*?`)',$mode,'plugin_mathjax_protecttex');
79+
7780
// Protect specified tags, if any
7881
$conf_mathtags = $this->getConf('mathtags');
7982
$mathtags = explode(',', $conf_mathtags);
@@ -91,6 +94,9 @@ public function postConnect() {
9194
$this->Lexer->addExitPattern('\\\\end{' . $env . '}','plugin_mathjax_protecttex');
9295
}
9396

97+
// Protect the default AsciiMath delimiter
98+
$this->Lexer->addExitPattern('`','plugin_mathjax_protecttex');
99+
94100
// Protect specified tags, if any
95101
$conf_mathtags = $this->getConf('mathtags');
96102
$mathtags = explode(',', $conf_mathtags);

0 commit comments

Comments
 (0)