Skip to content

Commit

Permalink
Close the code fence
Browse files Browse the repository at this point in the history
  • Loading branch information
pydanny committed Oct 11, 2024
1 parent 9e93f8c commit 0003567
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nb2fasthtml/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_nb_lang(nb): return nb['metadata']['kernelspec']['language']
# %% ../nbs/00_core.ipynb
def render_code_source(cell,lang='python',render_md=render_md):
if cell['source']==[]: return ''
code = f'''```{lang}\n{''.join(strip_list(cell['source']))}'''
code = f'''```{lang}\n{''.join(strip_list(cell['source']))}```'''
return render_md(code)

# %% ../nbs/00_core.ipynb
Expand Down
2 changes: 1 addition & 1 deletion nbs/00_core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"#| export\n",
"def render_code_source(cell,lang='python',render_md=render_md):\n",
" if cell['source']==[]: return ''\n",
" code = f'''```{lang}\\n{''.join(strip_list(cell['source']))}'''\n",
" code = f'''```{lang}\\n{''.join(strip_list(cell['source']))}```'''\n",
" return render_md(code)"
]
},
Expand Down

0 comments on commit 0003567

Please sign in to comment.