Commit e03f8a26488ea25be0b4355701eebe62040bcd53
1 parent
1154a910
Exists in
master
and in
1 other branch
reverted table and image md
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
aprendizations/tools.py
| ... | ... | @@ -101,14 +101,14 @@ class HighlightRenderer(mistune.Renderer): |
| 101 | 101 | return highlight(code, lexer, formatter) |
| 102 | 102 | |
| 103 | 103 | def table(self, header, body): |
| 104 | - return (f'<table class="table table-sm"><thead class="thead-light">' | |
| 105 | - f'{header}</thead><tbody>{body}</tbody></table>') | |
| 104 | + return '<table class="table table-sm"><thead class="thead-light">' \ | |
| 105 | + + header + '</thead><tbody>' + body + '</tbody></table>' | |
| 106 | 106 | |
| 107 | 107 | def image(self, src, title, alt): |
| 108 | 108 | alt = mistune.escape(alt, quote=True) |
| 109 | 109 | title = mistune.escape(title or '', quote=True) |
| 110 | - return (f'<img src="/file/{src}" class="img-fluid mx-auto d-block" ' | |
| 111 | - f'alt="{alt}" title="{title}">') | |
| 110 | + return f'<img src="/file/{src}" class="img-fluid mx-auto d-block" ' \ | |
| 111 | + f'alt="{alt}" title="{title}">' | |
| 112 | 112 | |
| 113 | 113 | # Pass math through unaltered - mathjax does the rendering in the browser |
| 114 | 114 | def block_math(self, text): | ... | ... |