[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Discrepancy between documentation and implementation regarding comme
From: |
Adam Porter |
Subject: |
Re: Discrepancy between documentation and implementation regarding comments |
Date: |
Sun, 27 Oct 2019 15:09:49 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
I agree with Robert that "whitespace" includes newlines in "Emacsland."
For example, with this document (the second "#" has a newline
immediately after, no spaces or tabs):
#+BEGIN_SRC org
foo
# comment
bar
#
buzz
#+END_SRC
This code matches both lines that begin with "#":
(re-search-forward (rx bol "#" (1+ space)))
But this code only matches the first one, because "blank" only matches
"horizontal whitespace":
(re-search-forward (rx bol "#" (1+ blank)))
So I think Pandoc is technically at fault here. However, outside of
Emacs's own context, I can see how the the documentation could be
misinterpreted in this case, so it's hard to fault them too much. :)