Skip to content

Commit

Permalink
Handle quote blocks in ejira-parser
Browse files Browse the repository at this point in the history
  • Loading branch information
nyyManni committed Dec 12, 2018
1 parent 6326d55 commit 9ef57f9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ejira-parser.el
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,22 @@
;; Auto-detecting language alters match data, restore it.
(set-match-data md)))))

;; Quote block
("^{quote}\\(.*\\(?:
.*\\)*?\\)?
?{quote}"
. (lambda ()
(let ((body (match-string 1))
(md (match-data)))
(prog1
(concat
"#+BEGIN_QUOTE\n"
(replace-regexp-in-string "^" " " body)
"\n#+END_QUOTE")

;; Auto-detecting language alters match data, restore it.
(set-match-data md)))))

;; Link to a user
("\\[~\\([a-zA-Z_.]*\\)\\]"
. (lambda ()
Expand Down

0 comments on commit 9ef57f9

Please sign in to comment.