1

When reading markdown in markdown-view mode, I'd like the markdown code to be "boxed" in the sense that the code has a different background throughout the entire window width. Currently, if changing the face markdown-code-face, it only affects the text that makes up the code, but you get a jagged background for the right side of the code.

This is what you currently get:

Screenshot of the current situation

This is what I'd like:

enter image description here

Is there any way of achieving this?

1 Answer 1

2

You can find out what face is being used by a certain character by placing your cursor on the character and then doing C-u C-x =.

In this case, you'll find out that the face is markdown-code-face, so try customizing that face and set its extend attribute to t: M-x customize-face RET markdown-code-face, click on Show All Attributes, checkmark the Extend attribute and set its value to On; then Apply to test and Apply and Save to make the setting permanent.

See the description of the extend face attribute in Face Attributes in the Emacs Lisp Reference manual.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.