MacDownApp / MacDownApp/macdown
Help needed: Is it possible to enable "vanilla" prism.js syntax, i.e. with the `language-` prefix?
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
Hello,
My workflow involves editing the same markdown files with multiple apps. After incorporating MacDown into this workflow, I noticed that prism.js behaves differently in MacDown and other apps. In order to get syntax highlighting work properly in each app, I have to do the following:
In MacDown,
```
```c
\\Some code written in C
```
```
In other apps,
```
```language-c
\\Some code written in C
```
```
As a result, the same markdown files cannot be highlighted properly *at the same time* in MacDown and other apps because of the incompatible implementations. After consulting the dev team of other apps, I was informed that the second way is the "official" prism.js syntax and that I should contact MacDown dev(s) instead.
So, is there already some way that allows me to enable the "vanilla" prism.js syntax? If not, could you please consider adding this option?
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 by tracing MacDown's Prism.js syntax-highlighting integration and how Markdown code fences are converted. Check whether the integration accepts the language- prefix alongside the existing form; done means code fences using that prefix receive the expected syntax highlighting without breaking current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100