diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-12-18 16:25:59 -0200 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-12-22 10:46:41 -0200 |
commit | 44ee0f1369e00db9aadd2985e1968573ee873a22 (patch) | |
tree | 0e0103b22ab0352b3002015eb2f2b30d3b48b1cb | |
parent | 569e1397bd2e1bcad34658780ef758e979caa243 (diff) |
Don't fill comments. Affects #141
-rw-r--r-- | sx-question-print.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sx-question-print.el b/sx-question-print.el index ad53b04..6fa84a9 100644 --- a/sx-question-print.el +++ b/sx-question-print.el @@ -374,6 +374,7 @@ E.g.: (defun sx-question-mode--dont-fill-here () "If text shouldn't be filled here, return t and skip over it." (or (sx-question-mode--skip-and-fontify-pre) + (sx-question-mode--skip-comments) ;; Skip headers and references (let ((pos (point))) (skip-chars-forward "\r\n[:blank:]") @@ -449,5 +450,16 @@ font-locking." (goto-char before) nil))) +(defun sx-question-mode--skip-comments () + "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." + (let ((before (point))) + (skip-chars-forward "\r\n[:blank:]") + (if (markdown-match-comments (line-end-position)) + t + (goto-char before) + nil))) + (provide 'sx-question-print) ;;; sx-question-print.el ends here |