Skip to content

Commit

Permalink
Merge pull request #501 from yacchin1205/fix/attached-images
Browse files Browse the repository at this point in the history
Prevent to copy images with `attachment:`
  • Loading branch information
jph00 authored Jul 22, 2021
2 parents b009f0b + d163e24 commit be0f545
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nbdev/export2html.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def _img2jkl(d, h, jekyll=True):

# Cell
def _is_real_image(src):
return not (src.startswith('http://') or src.startswith('https://') or src.startswith('data:image/'))
return not (src.startswith('http://') or src.startswith('https://') or src.startswith('data:image/') or src.startswith('attachment:'))

# Cell
def copy_images(cell, fname, dest, jekyll=True):
Expand Down
2 changes: 1 addition & 1 deletion nbs/03_export2html.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@
"source": [
"#export\n",
"def _is_real_image(src):\n",
" return not (src.startswith('http://') or src.startswith('https://') or src.startswith('data:image/'))"
" return not (src.startswith('http://') or src.startswith('https://') or src.startswith('data:image/') or src.startswith('attachment:'))"
]
},
{
Expand Down

0 comments on commit be0f545

Please sign in to comment.