Show More
@@ -84,14 +84,14 class MathBlockLexer(mistune.BlockLexer): | |||
|
84 | 84 | rules = MathBlockGrammar() |
|
85 | 85 | super(MathBlockLexer, self).__init__(rules, **kwargs) |
|
86 | 86 | |
|
87 |
def |
|
|
87 | def output_block_math(self, m): | |
|
88 | 88 | """Parse a $$math$$ block""" |
|
89 | 89 | self.tokens.append({ |
|
90 | 90 | 'type': 'block_math', |
|
91 | 91 | 'text': m.group(1) |
|
92 | 92 | }) |
|
93 | 93 | |
|
94 |
def |
|
|
94 | def output_latex_environment(self, m): | |
|
95 | 95 | self.tokens.append({ |
|
96 | 96 | 'type': 'latex_environment', |
|
97 | 97 | 'name': m.group(1), |
@@ -124,10 +124,10 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