mirror of
https://github.com/larstvei/ox-gfm.git
synced 2024-11-26 01:28:30 +00:00
Skip trimming newline in paragraph
This commit is contained in:
parent
4889adc219
commit
f7b76d5a78
13
ox-gfm.el
13
ox-gfm.el
@ -73,14 +73,11 @@
|
||||
"Transcode PARAGRAPH element into Github Flavoured Markdown format.
|
||||
CONTENTS is the paragraph contents. INFO is a plist used as a
|
||||
communication channel."
|
||||
(let ((contents
|
||||
(concat (mapconcat 'identity (split-string contents) " ")
|
||||
"\n")))
|
||||
(let ((first-object (car (org-element-contents paragraph))))
|
||||
;; If paragraph starts with a #, protect it.
|
||||
(if (and (stringp first-object) (string-match "\\`#" first-object))
|
||||
(replace-regexp-in-string "\\`#" "\\#" contents nil t)
|
||||
contents))))
|
||||
(let ((first-object (car (org-element-contents paragraph))))
|
||||
;; If paragraph starts with a #, protect it.
|
||||
(if (and (stringp first-object) (string-match "\\`#" first-object))
|
||||
(replace-regexp-in-string "\\`#" "\\#" contents nil t)
|
||||
contents)))
|
||||
|
||||
|
||||
;;;; Src Block
|
||||
|
Loading…
Reference in New Issue
Block a user