Skip to content

Code Block Background Color only where text is #794

@phuhl

Description

@phuhl

Expected Behavior

Org mode and most online Markdown visualizations show the background color for code blocks full width:

Org-mode:
image

Markdown rendered by Github:
image

Also, I personally find it easier to work with code in a block that is full width colorized.

Actual Behavior

Currently markdown mode applies markdown-pre-face only where text is within a code block:

image

Should this be intended behavior, maybe a feature flag could be added to switch between viewing modes for code blocks.

Steps to Reproduce

  1. Set a background color to markdown-pre-face that is different from the rest:
    (custom-set-faces `(markdown-pre-face ((t :background "#ff0000"))))
  2. Create code block in md mode

Backtrace

n/a

Software Versions

  • Markdown Mode: version 2.6-alpha, 20230817.847 from Melpa
  • Emacs: GNU Emacs 29.1.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-08-16
  • OS: Arch Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions