mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
fix(docs): don't hide # lines in src blocks
This would hide shebang lines and comments in languages that use # as a line comment delimiter.
This commit is contained in:
@ -148,6 +148,7 @@
|
|||||||
(save-match-data
|
(save-match-data
|
||||||
(let ((case-fold-search t))
|
(let ((case-fold-search t))
|
||||||
(while (re-search-forward "^[ \t]*\\#" nil t)
|
(while (re-search-forward "^[ \t]*\\#" nil t)
|
||||||
|
(unless (org-in-src-block-p t)
|
||||||
(catch 'abort
|
(catch 'abort
|
||||||
(org-fold-core-region
|
(org-fold-core-region
|
||||||
(line-beginning-position)
|
(line-beginning-position)
|
||||||
@ -161,7 +162,7 @@
|
|||||||
((looking-at "+\\(?:begin\\|end\\)_\\([^ \n]+\\)")
|
((looking-at "+\\(?:begin\\|end\\)_\\([^ \n]+\\)")
|
||||||
(line-end-position))
|
(line-end-position))
|
||||||
((line-beginning-position 2)))
|
((line-beginning-position 2)))
|
||||||
doom-docs-mode 'doom-doc-hidden)))))))
|
doom-docs-mode 'doom-doc-hidden))))))))
|
||||||
|
|
||||||
(defun doom-docs--hide-drawers-h ()
|
(defun doom-docs--hide-drawers-h ()
|
||||||
"Hide all property drawers."
|
"Hide all property drawers."
|
||||||
|
Reference in New Issue
Block a user