MacDownApp / MacDownApp/macdown

Support attributes with { }

Open
#1,112 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

plugin request
Dominant language
Rich Text Format
Stars
9.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to add a class (and other attributes) to images, but it isn't rendered as I thought it would.

The class I put with `{ .onethird }` just after the image is rendered as text following the image:

image

This is very useful to add classes, ids and other attributes, and often used when the Markdown renderer is Markdown-it: https://www.npmjs.com/package/markdown-it-attrs

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

The issue names no source file or test; start by locating MacDown’s Markdown-to-HTML rendering entry point and checking how `{ .onethird }` is parsed after an image. Done means the class and other attributes are rendered as HTML attributes rather than literal text, with a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.