From 4b8f912d9ba362de5cd8dd0bb1f00b31103fffcc Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 31 Jul 2019 12:54:11 -0700 Subject: allow empty lang code blocks --- sqlite-notebook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlite-notebook.py b/sqlite-notebook.py index 7f83f61..2bdc21c 100755 --- a/sqlite-notebook.py +++ b/sqlite-notebook.py @@ -12,7 +12,7 @@ class SqliteMarkdownRenderer(mistune.Renderer): self.conn = conn def block_code(self, code, lang): - if lang.strip().lower() == 'sql': + if lang and lang.strip().lower() == 'sql': # remove comment lines core = code.strip() code = '\n'.join( -- cgit v1.2.3