Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recognize definition list definitions as paragraph starts #20

Closed
marijnh opened this issue Sep 8, 2015 · 2 comments
Closed

Recognize definition list definitions as paragraph starts #20

marijnh opened this issue Sep 8, 2015 · 2 comments

Comments

@marijnh
Copy link

marijnh commented Sep 8, 2015

Using a line starting with a colon to denote a definition list is a widely used Markdown extension. Adding the following line to paragraph-start allows one to fill such definition paragraphs without having them collapse with the previous line (the defined term).

diff --git a/markdown-mode.el b/markdown-mode.el
index e61ef78..7ef0889 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -5090,6 +5090,7 @@ before regenerating font-lock rules for extensions."
                     "[ \t]*[*+-][ \t]+" ; unordered list item
                     "[ \t]*\\(?:[0-9]+\\|#\\)\\.[ \t]+" ; ordered list item
                     "[ \t]*\\[\\S-*\\]:[ \t]+" ; link ref def
+                    "[ \t]*:[ \t]+" ; definition
                     )
                   "\\|"))
   (set
@vyp
Copy link

vyp commented Sep 8, 2015

+1. The relevant reference if you didn't already know: http://pandoc.org/README.html#definition-lists.

jrblevin added a commit that referenced this issue Sep 9, 2015
This is related to the definition list extension as defined by PHP
Markdown Extra, Pandoc, and so on.  This patch prevents definitions from
collapsing with the previous line (the defined term) when filling.

This closes the following issue:
#20

Thanks to Marijn Haverbeke (@marijnh) for the patch.
@jrblevin
Copy link
Owner

jrblevin commented Sep 9, 2015

Applied--thanks for the patch.

@jrblevin jrblevin closed this as completed Sep 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants