MacDownApp / MacDownApp/macdown

Help needed: Is it possible to enable "vanilla" prism.js syntax, i.e. with the `language-` prefix?

Open
#1,206 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.