Show More
@@ -77,7 +77,7 b' class MathBlockGrammar(mistune.BlockGrammar):' | |||
|
77 | 77 | |
|
78 | 78 | @undoc |
|
79 | 79 | class MathBlockLexer(mistune.BlockLexer): |
|
80 |
default_ |
|
|
80 | default_rules = ['block_math', 'latex_environment'] + mistune.BlockLexer.default_rules | |
|
81 | 81 | |
|
82 | 82 | def __init__(self, rules=None, **kwargs): |
|
83 | 83 | if rules is None: |
@@ -105,7 +105,7 b' class MathInlineGrammar(mistune.InlineGrammar):' | |||
|
105 | 105 | |
|
106 | 106 | @undoc |
|
107 | 107 | class MathInlineLexer(mistune.InlineLexer): |
|
108 |
default_ |
|
|
108 | default_rules = ['math'] + mistune.InlineLexer.default_rules | |
|
109 | 109 | |
|
110 | 110 | def __init__(self, renderer, rules=None, **kwargs): |
|
111 | 111 | if rules is None: |
@@ -124,10 +124,10 b' class MarkdownWithMath(mistune.Markdown):' | |||
|
124 | 124 | kwargs['block'] = MathBlockLexer |
|
125 | 125 | super(MarkdownWithMath, self).__init__(renderer, **kwargs) |
|
126 | 126 | |
|
127 |
def |
|
|
127 | def output_block_math(self): | |
|
128 | 128 | return self.renderer.block_math(self.token['text']) |
|
129 | 129 | |
|
130 |
def |
|
|
130 | def output_latex_environment(self): | |
|
131 | 131 | return self.renderer.latex_environment(self.token['name'], self.token['text']) |
|
132 | 132 | |
|
133 | 133 | @undoc |
General Comments 0
You need to be logged in to leave comments.
Login now