MacDownApp / MacDownApp/macdown
Not up-to-dated PDF/HTML are exported if the preview is hidden
Nobody has claimed this yet.
- Dominant language
- Rich Text Format
- Stars
- 9.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
It seems there used to be a problem with copying HTML, so there is an useful comment in [MPDocument.m](https://github.com/MacDownApp/macdown/blob/master/MacDown/Code/Document/MPDocument.m#L1234-L1242).
```objc
// If the preview is hidden, the HTML are not updating on text change.
// Perform one extra rendering so that the HTML is up to date, and do the
// copy in the rendering callback.
if (!self.needsHtml)
{
self.copying = YES;
[self.renderer parseAndRenderNow];
return;
}
```
I think similar process should be executed before exporting HTML/PDF. I'm trying to fix this myself but not yet succeeded.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in MacDown/Code/Document/MPDocument.m at the linked rendering comment, then trace the HTML/PDF export entry points. Compare their behavior when the preview is hidden; done means both exports use the current document content without requiring the preview to be visible.
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
- 38/100