aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-04-19 17:05:00 +0100
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-04-19 17:05:00 +0100
commit7ee1f7f1f28777d2d69a7ef589f6c7c6667835c3 (patch)
treee9793e76cdbd4456489a24f8ab84da921101cf78
parent80f5fcfb384e17cad114cc497651acc536008ff1 (diff)
Hide html comments
-rw-r--r--sx-question-print.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/sx-question-print.el b/sx-question-print.el
index ed13b71..096586a 100644
--- a/sx-question-print.el
+++ b/sx-question-print.el
@@ -759,7 +759,15 @@ move point, don't create the code-block button."
"If there's an html comment ahead, skip it and return t."
;; @TODO: Handle the comment.
;; "Handling means to store any relevant metadata it might be holding."
- (markdown-match-comments (line-end-position)))
+ (let ((end (save-excursion
+ (when (markdown-match-comments (line-end-position))
+ (point)))))
+ (when end
+ (delete-region (point) end)
+ (skip-chars-backward "[:blank:]")
+ (when (looking-at "^[:blank:]*\n")
+ (replace-match ""))
+ t)))
(defun sx-question-mode--skip-headline ()
"If there's a headline ahead, skip it and return non-nil."