MacDownApp / MacDownApp/macdown

if path contains '#', then image does not render in preview

Open
#1,290 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rich Text Format
Stars
9.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

**Issue**

If a relative path segment contains `#`, then the referenced image does not render in preview.

**Configuration**

* macOS Big Sur 11.6.3
* MacDown: version 0.7.3 (1008.4) and version 0.8.0d71 (1079)

**Test Files**

[test folder.zip](https://github.com/MacDownApp/macdown/files/8064417/test.folder.zip)

**Expected Result**

The expected result is achieved when _the relative paths do not contain `#`_.

```
test folder
├── notes.md
└── notes_files
└── blue.png
```

![Screen Shot 2022-02-14 at 14 32 11](https://user-images.githubusercontent.com/15098151/153958326-3e8f2fec-b334-46f2-97cf-2088d4fb1025.png)

**Unexpected Results**

See the zip file of a failing test example which is attached in the above **Test Files** section. (The parent path of the relative path does not appear to have this issue in MacDown.)

```
test folder
├── notes#.md
└── notes#_files
└── blue.png
```

![Screen Shot 2022-02-14 at 14 32 24](https://user-images.githubusercontent.com/15098151/153958288-fe9d18d1-ddcc-4eb3-a5e5-746d2ca5107c.png)

Contributor guide

Open the contributing guide

Research direction

Start by extracting the attached test folder.zip and reproducing the preview failure in MacDown using the stated versions and macOS configuration. Trace how the preview resolves relative image paths containing #, then verify that blue.png renders for notes#.md and notes#_files while paths without # continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, objective-c
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.