Emacs version: 29.1 Org-mode version: e1569918cc94253650781e83a09695739c93352f (latest in git)
Test document: ``` #+CAPTION: foo # bar ``` This parses as a paragraph with the caption of foo and the body of "# bar" when it should parse as a regular keyword followed by a comment. Relevant org-syntax[1] bit: > a keyword with the same KEY as an affiliated keyword may occur so long as it > is not immediately preceding a valid element that can be affiliated. For > example, an instance of #+caption: hi followed by a blank line will be parsed > as a keyword, not an affiliated keyword. [1] https://orgmode.org/worg/org-syntax.html#Keywords -- Tom Alexander pgp: https://fizz.buzz/pgp.asc