MacDownApp / MacDownApp/macdown

Add a line wrapping option for code blocks

Open
#1,136 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Rich Text Format
Stars
9.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

I'd like there to be an option to have code blocks be line wrapped. Maybe a check box for it in Rendering -> "Syntax highlighted code block" next to "Show line numbers" etc.?

If I try hard enough I can dig through the css files in Contents/Resources/Prism/themes and change "white-space: pre;" to "white-space: pre-wrap;", but doing so breaks the code signature of the app. And that's not a very nice way to do it anyway.

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 with the Rendering → “Syntax highlighted code block” settings and the styles under Contents/Resources/Prism/themes. Trace how the existing “Show line numbers” option is applied, then determine how a wrapping option can change code-block rendering without editing signed resources. Done means the option is available beside the existing rendering controls and wrapped code blocks work without breaking the app signature.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, objective-c
Domain
desktop
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.