Просмотр исходного кода

Allow tex parsing in <code> tags

Just using $ as delimiter in markdown document fails since the markdown
parser unknown to the dollar syntax will try to interpret underscores.
Putting the $ delimented formula in backticks will cause the markdown
parser to put the tex-code with the $ delimiters into a code block.
The texcode will then be unchanged. This patch allows for mathJax to
interpret and automagically display the tex-formulas.
Martin Goth 10 лет назад
Родитель
Сommit
0cb4d10504
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      plugin/math/math.js

+ 4 - 1
plugin/math/math.js

@@ -14,7 +14,10 @@ var RevealMath = window.RevealMath || (function(){
 
 		MathJax.Hub.Config({
 			messageStyle: 'none',
-			tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] },
+			tex2jax: {
+				inlineMath: [['$','$'],['\\(','\\)']] ,
+				skipTags: ['script','noscript','style','textarea','pre']
+			},
 			skipStartupTypeset: true
 		});