iamcco / iamcco/markdown-preview.nvim

Synchronize preview when image is written

Open
#594 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8k
Forks
411
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
The previewer should update/synchronize when an image within the document is updated. Currently, the previewer only reloads images when restarted or when the web-page is reloaded.

**To Reproduce**
1. Create a test folder
2. Download an image to the folder (eg this one [from wikipedia](https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Image_created_with_a_mobile_phone.png/1920px-Image_created_with_a_mobile_phone.png)); name it `test_image.png`.
3. Create a local markdown file with the following contents:
```
# test file

The figure to synchronize: ![the image](test_image.png)
```
4. Launch the markdown previewer
5. Edit the image or replace it. Ensure the image is overwritten while the previewer is active.
6. Observe that the previewed image is unchanged.
7. (Optional) edit text within the document and observe that the previewed document changes.

**Expected behavior**
When the included image is overwritten, the previewed image should be reloaded.

**Desktop (please complete the following information):**
- OS: Arch Linux

Log:
```
==============================================================================
mkdp: health#mkdp#check

- Platform: linux
- Nvim Version: NVIM v0.9.1
- Pre build: /home/silas/.local/share/nvim/site/pack/packer/opt/markdown-preview.nvim/app/bin/markdown-preview-linux
- Pre build version: 0.0.10
- OK Using pre build
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.