Skip to content

Commit

Permalink
Raise footnote markers and optionally hide markup
Browse files Browse the repository at this point in the history
Also applies to Pandoc inline footnotes.
  • Loading branch information
jrblevin committed Jun 15, 2017
1 parent 7499d28 commit 669815e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@
- Add basic font-lock support for common file inclusion syntax:
`<<(file)`, `<<[title](file)`, `<<[file]`, and ``<<{file}`.
- Add font lock support for Pandoc inline footnotes. ([GH-81][])
- Raise footnote markers and inline footnote text, and
optionally hide markup.

* Improvements:

Expand Down
16 changes: 11 additions & 5 deletions markdown-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -2243,6 +2243,10 @@ START and END delimit region to propertize."
'(face markdown-link-title-face invisible markdown-markup)
"List of properties and values to apply to included code titles.")

(defconst markdown-inline-footnote-properties
'(face nil display ((raise 0.2) (height 0.8)))
"Properties to apply to footnote markers and inline footnotes.")

(defcustom markdown-hide-markup nil
"Determines whether markup in the buffer will be hidden.
When set to nil, all markup is displayed in the buffer as it
Expand Down Expand Up @@ -2666,13 +2670,15 @@ Depending on your font, some reasonable choices are:
(markdown-fontify-angle-uris)
(,markdown-regex-email . 'markdown-plain-url-face)
(markdown-fontify-list-items)
(,markdown-regex-footnote . ((1 markdown-markup-face) ; [^
(,markdown-regex-footnote . ((0 markdown-inline-footnote-properties)
(1 markdown-markup-properties) ; [^
(2 markdown-footnote-marker-face) ; label
(3 markdown-markup-face))) ; ]
(,markdown-regex-pandoc-inline-footnote . ((1 markdown-markup-properties) ; ^
(2 'markdown-markup-face) ; [
(3 markdown-markup-properties))) ; ]
(,markdown-regex-pandoc-inline-footnote . ((0 markdown-inline-footnote-properties)
(1 markdown-markup-properties) ; ^
(2 markdown-markup-properties) ; [
(3 'markdown-footnote-text-face) ; text
(4 'markdown-markup-face))) ; ]
(4 markdown-markup-properties))) ; ]
(markdown-match-includes . ((1 markdown-markup-properties)
(2 markdown-markup-properties nil t)
(3 markdown-include-title-properties nil t)
Expand Down

0 comments on commit 669815e

Please sign in to comment.