Skip to content

Commit

Permalink
Fix markdown-header-face inherit from nil error
Browse files Browse the repository at this point in the history
When `markdown-header-scaling` is nil, the :inherit attribute value of
`markdown-header-face` will be `(nil font-lock-function-name-faces)`.
When exporting html from org-mode file which contains markdown source
block, it will lead to an "Invalid face" error.
  • Loading branch information
galeo authored and jrblevin committed May 12, 2017
1 parent fc96bef commit d587180
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions markdown-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -2165,8 +2165,8 @@ Used when `markdown-header-scaling' is non-nil."
(defun markdown-make-header-faces ()
"Build the faces used for Markdown headers."
(defface markdown-header-face
`((t (:inherit (,(when markdown-header-scaling 'variable-pitch)
font-lock-function-name-face)
`((t (:inherit (,@(when markdown-header-scaling 'variable-pitch)
font-lock-function-name-face)
:weight bold)))
"Base face for headers."
:group 'markdown-faces)
Expand Down

0 comments on commit d587180

Please sign in to comment.